[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Chris Lattner sabre at nondot.org
Fri Oct 27 17:59:34 PDT 2006



Changes in directory llvm/lib/Transforms/Scalar:

LoopStrengthReduce.cpp updated: 1.90 -> 1.91
---
Log message:

prepare for a change I'm about to make


---
Diffs of the changes:  (+6 -0)

 LoopStrengthReduce.cpp |    6 ++++++
 1 files changed, 6 insertions(+)


Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.90 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.91
--- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.90	Fri Oct 20 02:07:24 2006
+++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp	Fri Oct 27 19:59:20 2006
@@ -379,6 +379,9 @@
   for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
     if (PN->getIncomingValue(i) == IV) {
       SplitCriticalEdge(PN->getIncomingBlock(i), PN->getParent(), P);
+      // Splitting the critical edge can reduce the number of entries in this
+      // PHI.
+      e = PN->getNumIncomingValues();
       if (--NumUses == 0) break;
     }
   
@@ -589,6 +592,9 @@
           BasicBlock *NewBB = PN->getIncomingBlock(i);
           NewBB->moveBefore(PN->getParent());
         }
+        
+        // Splitting the edge can reduce the number of PHI entries we have.
+        e = PN->getNumIncomingValues();
       }
 
       Value *&Code = InsertedCode[PN->getIncomingBlock(i)];






More information about the llvm-commits mailing list