break edges more intelligently
authorChris Lattner <sabre@nondot.org>
Sat, 28 Oct 2006 06:45:33 +0000 (06:45 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 28 Oct 2006 06:45:33 +0000 (06:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31257 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopStrengthReduce.cpp

index 1c6acc6eef81148d39e43f4115fcab817e9364de..5b64e54f1f23e373f3b3246e44915a0971eec430 100644 (file)
@@ -378,7 +378,8 @@ static bool IVUseShouldUsePostIncValue(Instruction *User, Instruction *IV,
   // post-incremented value.
   for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
     if (PN->getIncomingValue(i) == IV) {
-      SplitCriticalEdge(PN->getIncomingBlock(i), PN->getParent(), P);
+      SplitCriticalEdge(PN->getIncomingBlock(i), PN->getParent(), P,
+                        true);
       // Splitting the critical edge can reduce the number of entries in this
       // PHI.
       e = PN->getNumIncomingValues();
@@ -582,7 +583,7 @@ void BasedUser::RewriteInstructionToUseNewBase(const SCEVHandle &NewBase,
           (PN->getParent() != L->getHeader() || !L->contains(PHIPred))) {
         
         // First step, split the critical edge.
-        SplitCriticalEdge(PHIPred, PN->getParent(), P);
+        SplitCriticalEdge(PHIPred, PN->getParent(), P, true);
             
         // Next step: move the basic block.  In particular, if the PHI node
         // is outside of the loop, and PredTI is in the loop, we want to