[llvm-commits] [llvm] r74491 - /llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
Dan Gohman
gohman at apple.com
Mon Jun 29 18:24:43 PDT 2009
Author: djg
Date: Mon Jun 29 20:24:43 2009
New Revision: 74491
URL: http://llvm.org/viewvc/llvm-project?rev=74491&view=rev
Log:
Minor code simplification.
Modified:
llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
Modified: llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp?rev=74491&r1=74490&r2=74491&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp Mon Jun 29 20:24:43 2009
@@ -282,10 +282,9 @@
// Attempt to hoist out all instructions except for the
// comparison and the branch.
bool AllInvariant = true;
- for (BasicBlock::iterator I = ExitingBlock->begin(),
- E = ExitingBlock->end(); I != E; ) {
+ for (BasicBlock::iterator I = ExitingBlock->begin(); &*I != BI; ) {
Instruction *Inst = I++;
- if (Inst == BI || Inst == CI)
+ if (Inst == CI)
continue;
if (Inst->isTrapping()) {
AllInvariant = false;
More information about the llvm-commits
mailing list