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 | e9100c69cbfbcc9298b663d80ef4ddf31d7bba69 (patch) | |
tree | bb1f9fc7e25dfa7ed88ce0f51679cf67d8e54a85 /lib/Transforms/Scalar/LoopStrengthReduce.cpp | |
parent | f9aaae06cd2109082cda2b09ef3f23e0e1cff47b (diff) |
Simplify for loop, clear a per-loop map after processing each loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22580 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index f3834158c1..a39ba6eda2 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/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; } |