summaryrefslogtreecommitdiff
path: root/polly
diff options
context:
space:
mode:
authorPaul Walker <paul.walker@arm.com>2023-03-02 12:23:52 +0000
committerPaul Walker <paul.walker@arm.com>2023-03-02 13:14:07 +0000
commit62d11b2ccaeec8abc12e07aa009c922d72fd6377 (patch)
tree2b0cbf2ae047496f0bde854381c8dd3dd9080171 /polly
parentc396073a0de6bc156514c34c0ffbdd227178c11b (diff)
downloadllvm-62d11b2ccaeec8abc12e07aa009c922d72fd6377.tar.gz
Revert "Revert "[SCEV] Add SCEVType to represent `vscale`.""
Relanding after fixing Polly related build error. This reverts commit 7b26dcae9eaf8cdcba7fef032fd83d060dffd4b4.
Diffstat (limited to 'polly')
-rw-r--r--polly/include/polly/Support/SCEVAffinator.h1
-rw-r--r--polly/lib/Support/SCEVAffinator.cpp4
-rw-r--r--polly/lib/Support/SCEVValidator.cpp6
-rw-r--r--polly/lib/Support/ScopHelper.cpp1
4 files changed, 12 insertions, 0 deletions
diff --git a/polly/include/polly/Support/SCEVAffinator.h b/polly/include/polly/Support/SCEVAffinator.h
index 35e87dfd9cd8..63a341a01309 100644
--- a/polly/include/polly/Support/SCEVAffinator.h
+++ b/polly/include/polly/Support/SCEVAffinator.h
@@ -99,6 +99,7 @@ private:
PWACtx visit(const llvm::SCEV *E);
PWACtx visitConstant(const llvm::SCEVConstant *E);
+ PWACtx visitVScale(const llvm::SCEVVScale *E);
PWACtx visitPtrToIntExpr(const llvm::SCEVPtrToIntExpr *E);
PWACtx visitTruncateExpr(const llvm::SCEVTruncateExpr *E);
PWACtx visitZeroExtendExpr(const llvm::SCEVZeroExtendExpr *E);
diff --git a/polly/lib/Support/SCEVAffinator.cpp b/polly/lib/Support/SCEVAffinator.cpp
index d1998d190ea1..c579dc18a6f5 100644
--- a/polly/lib/Support/SCEVAffinator.cpp
+++ b/polly/lib/Support/SCEVAffinator.cpp
@@ -266,6 +266,10 @@ PWACtx SCEVAffinator::visitConstant(const SCEVConstant *Expr) {
isl::manage(isl_pw_aff_from_aff(isl_aff_val_on_domain(ls, v))));
}
+PWACtx SCEVAffinator::visitVScale(const SCEVVScale *VScale) {
+ llvm_unreachable("SCEVVScale not yet supported");
+}
+
PWACtx SCEVAffinator::visitPtrToIntExpr(const SCEVPtrToIntExpr *Expr) {
return visit(Expr->getOperand(0));
}
diff --git a/polly/lib/Support/SCEVValidator.cpp b/polly/lib/Support/SCEVValidator.cpp
index 7f2a4910c6f2..e3d9818597ea 100644
--- a/polly/lib/Support/SCEVValidator.cpp
+++ b/polly/lib/Support/SCEVValidator.cpp
@@ -134,6 +134,12 @@ public:
return ValidatorResult(SCEVType::INT);
}
+ ValidatorResult visitVScale(const SCEVVScale *VScale) {
+ // We do not support VScale constants.
+ LLVM_DEBUG(dbgs() << "INVALID: VScale is not supported");
+ return ValidatorResult(SCEVType::INVALID);
+ }
+
ValidatorResult visitZeroExtendOrTruncateExpr(const SCEV *Expr,
const SCEV *Operand) {
ValidatorResult Op = visit(Operand);
diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp
index 90786756730e..afdb61f25b6c 100644
--- a/polly/lib/Support/ScopHelper.cpp
+++ b/polly/lib/Support/ScopHelper.cpp
@@ -338,6 +338,7 @@ private:
///
///{
const SCEV *visitConstant(const SCEVConstant *E) { return E; }
+ const SCEV *visitVScale(const SCEVVScale *E) { return E; }
const SCEV *visitPtrToIntExpr(const SCEVPtrToIntExpr *E) {
return SE.getPtrToIntExpr(visit(E->getOperand()), E->getType());
}