diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-08-02 02:44:31 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-08-02 02:44:31 +0000 |
| commit | dcce49e006ede1cecb3d109f31612759a89f2fcb (patch) | |
| tree | c1312d75da3830e006fef0319121c5db7bfa61bf /llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | |
| parent | beb01faea36b59a5b15ce92126b1ec371d2af1b2 (diff) | |
| download | bcm5719-llvm-dcce49e006ede1cecb3d109f31612759a89f2fcb.tar.gz bcm5719-llvm-dcce49e006ede1cecb3d109f31612759a89f2fcb.zip | |
Simplify for loop, clear a per-loop map after processing each loop
llvm-svn: 22580
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index f3834158c1c..a39ba6eda26 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -632,7 +632,7 @@ void LoopStrengthReduce::runOnLoop(Loop *L) { 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 @@ void LoopStrengthReduce::runOnLoop(Loop *L) { } IVUsesByStride.clear(); + CastedBasePointers.clear(); return; } |

