diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-22 15:08:57 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-22 15:08:57 +0000 |
commit | d2d1ae105d34209682d794c367f1df1cb23711c5 (patch) | |
tree | 940f256bdfe3a69cf8ee0f56294046e10bdc6376 /llvm/lib/Transforms/Scalar/LoopDeletion.cpp | |
parent | a46d66122ff571006ba7ce77ed5b5ad04b113c8a (diff) | |
download | bcm5719-llvm-d2d1ae105d34209682d794c367f1df1cb23711c5.tar.gz bcm5719-llvm-d2d1ae105d34209682d794c367f1df1cb23711c5.zip |
Use pre-increment instead of post-increment when the result is not used.
llvm-svn: 106542
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopDeletion.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopDeletion.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp index 48817ab9d5a..e4894e99b68 100644 --- a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp +++ b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp @@ -83,7 +83,7 @@ bool LoopDeletion::IsLoopDead(Loop* L, if (!L->makeLoopInvariant(I, Changed, Preheader->getTerminator())) return false; - BI++; + ++BI; } // Make sure that no instructions in the block have potential side-effects. @@ -176,7 +176,7 @@ bool LoopDeletion::runOnLoop(Loop* L, LPPassManager& LPM) { BasicBlock::iterator BI = exitBlock->begin(); while (PHINode* P = dyn_cast<PHINode>(BI)) { P->replaceUsesOfWith(exitingBlock, preheader); - BI++; + ++BI; } // Update the dominator tree and remove the instructions and blocks that will @@ -226,7 +226,7 @@ bool LoopDeletion::runOnLoop(Loop* L, LPPassManager& LPM) { LPM.deleteLoopFromQueue(L); Changed = true; - NumDeleted++; + ++NumDeleted; return Changed; } |