[llvm] r265537 - Simplify logic. NFC.
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 6 06:27:15 PDT 2016
Author: mcrosier
Date: Wed Apr 6 08:27:13 2016
New Revision: 265537
URL: http://llvm.org/viewvc/llvm-project?rev=265537&view=rev
Log:
Simplify logic. NFC.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp?rev=265537&r1=265536&r2=265537&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp Wed Apr 6 08:27:13 2016
@@ -128,14 +128,12 @@ bool LoopInstSimplify::runOnLoop(Loop *L
++NumSimplified;
}
}
- bool res = RecursivelyDeleteTriviallyDeadInstructions(I, TLI);
- if (res) {
- // RecursivelyDeleteTriviallyDeadInstruction can remove
- // more than one instruction, so simply incrementing the
- // iterator does not work. When instructions get deleted
- // re-iterate instead.
+ if (RecursivelyDeleteTriviallyDeadInstructions(I, TLI)) {
+ // RecursivelyDeleteTriviallyDeadInstruction can remove more than one
+ // instruction, so simply incrementing the iterator does not work.
+ // When instructions get deleted re-iterate instead.
BI = BB->begin(); BE = BB->end();
- LocalChanged |= res;
+ LocalChanged = true;
}
if (IsSubloopHeader && !isa<PHINode>(I))
More information about the llvm-commits
mailing list