use continue to reduce indentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60192 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-11-27 23:00:20 +00:00
parent 3481f24c06
commit a0d4486073

View File

@ -2076,8 +2076,10 @@ bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) {
//
// FIXME: this needs to eliminate an induction variable even if it's being
// compared against some value to decide loop termination.
if (PN->hasOneUse()) {
SmallPtrSet<PHINode *, 2> PHIs;
if (!PN->hasOneUse())
continue;
SmallPtrSet<PHINode *, 4> PHIs;
for (Instruction *J = dyn_cast<Instruction>(*PN->use_begin());
J && J->hasOneUse() && !J->mayWriteToMemory();
J = dyn_cast<Instruction>(*J->use_begin())) {
@ -2096,7 +2098,6 @@ bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) {
break;
}
}
}
DeleteTriviallyDeadInstructions(DeadInsts);
}
return Changed;