aboutsummaryrefslogtreecommitdiff
path: root/polly/lib/CodeGen/CodeGeneration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/CodeGen/CodeGeneration.cpp')
-rw-r--r--polly/lib/CodeGen/CodeGeneration.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp
index 833d20b..ad9b6e2 100644
--- a/polly/lib/CodeGen/CodeGeneration.cpp
+++ b/polly/lib/CodeGen/CodeGeneration.cpp
@@ -986,16 +986,10 @@ public:
bool runOnScop(Scop &S) {
ParallelLoops.clear();
- Region &R = S.getRegion();
+ assert(!S.getRegion().isTopLevelRegion()
+ && "Top level regions are not supported");
- assert(!R.isTopLevelRegion() && "Top level regions are not supported");
- assert(R.getEnteringBlock() && "Only support regions with a single entry");
-
- if (!R.getExitingBlock()) {
- BasicBlock *newExit = createSingleExitEdge(&R, this);
- for (Region::const_iterator RI = R.begin(), RE = R.end(); RI != RE; ++RI)
- (*RI)->replaceExitRecursive(newExit);
- }
+ simplifyRegion(&S, this);
BasicBlock *StartBlock = executeScopConditionally(S, this);