[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Aug 1 19:44:42 PDT 2005
Changes in directory llvm/lib/Transforms/Scalar:
LoopStrengthReduce.cpp updated: 1.19 -> 1.20
---
Log message:
Simplify for loop, clear a per-loop map after processing each loop
---
Diffs of the changes: (+2 -1)
LoopStrengthReduce.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.19 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.20
--- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.19 Mon Aug 1 20:32:29 2005
+++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Aug 1 21:44:31 2005
@@ -632,7 +632,7 @@
BasicBlock::iterator I = L->getHeader()->begin();
PHINode *PN;
- for (; (PN = dyn_cast<PHINode>(I)); ) {
+ while ((PN = dyn_cast<PHINode>(I))) {
++I; // Preincrement iterator to avoid invalidating it when deleting PN.
// At this point, we know that we have killed one or more GEP instructions.
@@ -664,5 +664,6 @@
}
IVUsesByStride.clear();
+ CastedBasePointers.clear();
return;
}
More information about the llvm-commits
mailing list