[polly] r230326 - [FIX] Create single exiting block

Johannes Doerfert doerfert at cs.uni-saarland.de
Tue Feb 24 03:46:18 PST 2015


Author: jdoerfert
Date: Tue Feb 24 05:46:18 2015
New Revision: 230326

URL: http://llvm.org/viewvc/llvm-project?rev=230326&view=rev
Log:
[FIX] Create single exiting block


Modified:
    polly/trunk/lib/Support/ScopHelper.cpp

Modified: polly/trunk/lib/Support/ScopHelper.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/ScopHelper.cpp?rev=230326&r1=230325&r2=230326&view=diff
==============================================================================
--- polly/trunk/lib/Support/ScopHelper.cpp (original)
+++ polly/trunk/lib/Support/ScopHelper.cpp Tue Feb 24 05:46:18 2015
@@ -169,10 +169,9 @@ BasicBlock *polly::simplifyRegion(Scop *
 
   // Create single exit edge if the region has multiple exit edges.
   if (!R->getExitingBlock()) {
-    BasicBlock *NewExit = createSingleExitEdge(R, P);
-
-    for (auto &&SubRegion : *R)
-      SubRegion->replaceExitRecursive(NewExit);
+    BasicBlock *NewExiting = createSingleExitEdge(R, P);
+    assert(NewExiting == R->getExitingBlock() &&
+           "Did not create a single exiting block");
   }
 
   return EnteringBB;





More information about the llvm-commits mailing list