summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/IslCodeGeneration.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>2014-09-18 11:17:17 +0000
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>2014-09-18 11:17:17 +0000
commitb164c795b7635778aa50d1b12df66150d88c2183 (patch)
treebbe03112952ec92e4372b98a84297963d6a4655e /polly/lib/CodeGen/IslCodeGeneration.cpp
parentdcb5f1dcf602f8d2951fe834a1a49f787dfea95b (diff)
downloadbcm5719-llvm-b164c795b7635778aa50d1b12df66150d88c2183.tar.gz
bcm5719-llvm-b164c795b7635778aa50d1b12df66150d88c2183.zip
[RTC] Runtime Alias Checks for the ISL backend
This change will build all alias groups (minimal/maximal accesses to possible aliasing base pointers) we have to check before we can assume an alias free environment. It will also use these to create Runtime Alias Checks (RTC) in the ISL code generation backend, thus allow us to optimize SCoPs despite possibly aliasing pointers when this backend is used. This feature will be enabled for the isl code generator, e.g., --polly-code-generator=isl, but disabled for: - The cloog code generator (still the default). - The case delinearization is enabled. - The case non-affine accesses are allowed. llvm-svn: 218046
Diffstat (limited to 'polly/lib/CodeGen/IslCodeGeneration.cpp')
-rw-r--r--polly/lib/CodeGen/IslCodeGeneration.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp
index 0d9a798de04..22a8fe51abf 100644
--- a/polly/lib/CodeGen/IslCodeGeneration.cpp
+++ b/polly/lib/CodeGen/IslCodeGeneration.cpp
@@ -591,7 +591,9 @@ public:
Value *buildRTC(PollyIRBuilder &Builder, IslExprBuilder &ExprBuilder) {
Builder.SetInsertPoint(Builder.GetInsertBlock()->getTerminator());
Value *RTC = ExprBuilder.create(AI->getRunCondition());
- return Builder.CreateIsNotNull(RTC);
+ if (!RTC->getType()->isIntegerTy(1))
+ RTC = Builder.CreateIsNotNull(RTC);
+ return RTC;
}
bool runOnScop(Scop &S) {
OpenPOWER on IntegriCloud