diff options
author | Dan Gohman <gohman@apple.com> | 2009-12-14 17:10:44 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-12-14 17:10:44 +0000 |
commit | a77d588c752bbf5d339f674af50733c10b113d0a (patch) | |
tree | 40df2b782a3b20ee95c1a1629004da67b32ea9ed /lib/Transforms/Scalar/LoopStrengthReduce.cpp | |
parent | 6dc1ef392348b61f228612f24087f47d4e4e2982 (diff) |
Don't bother cleaning up if there's nothing to clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91288 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 12bb87a77d..51cb3d6693 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -2754,14 +2754,14 @@ bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) { // After all sharing is done, see if we can adjust the loop to test against // zero instead of counting up to a maximum. This is usually faster. OptimizeLoopCountIV(L); - } - // We're done analyzing this loop; release all the state we built up for it. - IVsByStride.clear(); + // We're done analyzing this loop; release all the state we built up for it. + IVsByStride.clear(); - // Clean up after ourselves - if (!DeadInsts.empty()) - DeleteTriviallyDeadInstructions(); + // Clean up after ourselves + if (!DeadInsts.empty()) + DeleteTriviallyDeadInstructions(); + } // At this point, it is worth checking to see if any recurrence PHIs are also // dead, so that we can remove them as well. |