[Refactor] Cleanup isl code generation
Summary:
+ Refactor the runtime check (RTC) build function
+ Added helper function to create an PollyIRBuilder
+ Change the simplify region function to create not
only unique entry and exit edges but also enfore that
the entry edge is unconditional
+ Cleaned the IslCodeGeneration runOnScop function:
- less post-creation changes of the created IR
+ Adjusted and added test cases
Reviewers: grosser, sebpop, simbuerg, dpeixott
Subscribers: llvm-commits, #polly
Differential Revision: http://reviews.llvm.org/D5076
llvm-svn: 217508
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp
index c9f7c3f..4f3362c 100644
--- a/polly/lib/CodeGen/CodeGeneration.cpp
+++ b/polly/lib/CodeGen/CodeGeneration.cpp
@@ -1045,7 +1045,8 @@
simplifyRegion(&S, this);
- BasicBlock *StartBlock = executeScopConditionally(S, this);
+ Value *RTC = ConstantInt::getTrue(S.getSE()->getContext());
+ BasicBlock *StartBlock = executeScopConditionally(S, this, RTC);
PollyIRBuilder Builder(StartBlock->begin());