[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Devang Patel
dpatel at apple.com
Fri Mar 9 13:20:15 PST 2007
Changes in directory llvm/lib/Transforms/Scalar:
LoopStrengthReduce.cpp updated: 1.115 -> 1.116
---
Log message:
Increment iterator now because IVUseShouldUsePostIncValue may remove
User from the list of I users.
---
Diffs of the changes: (+6 -2)
LoopStrengthReduce.cpp | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.115 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.116
--- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.115 Tue Mar 6 15:14:09 2007
+++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Fri Mar 9 15:19:53 2007
@@ -400,10 +400,14 @@
SCEVHandle Stride = Start;
if (!getSCEVStartAndStride(ISE, L, Start, Stride))
return false; // Non-reducible symbolic expression, bail out.
-
- for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E;++UI){
+
+ for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E;) {
Instruction *User = cast<Instruction>(*UI);
+ // Increment iterator now because IVUseShouldUsePostIncValue may remove
+ // User from the list of I users.
+ ++UI;
+
// Do not infinitely recurse on PHI nodes.
if (isa<PHINode>(User) && Processed.count(User))
continue;
More information about the llvm-commits
mailing list