Reduce indentation. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138968 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2011-09-01 21:29:49 +00:00
parent c8c0fd3993
commit 6bb4e7e8e8

View File

@ -1571,25 +1571,26 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
// Do a quick scan over the function. If we find any blocks that are // Do a quick scan over the function. If we find any blocks that are
// unreachable, remove any instructions inside of them. This prevents // unreachable, remove any instructions inside of them. This prevents
// the instcombine code from having to deal with some bad special cases. // the instcombine code from having to deal with some bad special cases.
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
if (!Visited.count(BB)) { if (Visited.count(BB)) continue;
// Delete the instructions backwards, as it has a reduced likelihood of
// having to update as many def-use and use-def chains. // Delete the instructions backwards, as it has a reduced likelihood of
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) { // having to update as many def-use and use-def chains.
Instruction *Inst = &*I++; for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) {
if (isa<TerminatorInst>(Inst)) Instruction *Inst = &*I++;
break; if (isa<TerminatorInst>(Inst))
if (!Inst->use_empty()) break;
Inst->replaceAllUsesWith(UndefValue::get(Inst->getType())); if (!Inst->use_empty())
if (isa<LandingPadInst>(Inst)) Inst->replaceAllUsesWith(UndefValue::get(Inst->getType()));
continue; if (isa<LandingPadInst>(Inst))
if (!isa<DbgInfoIntrinsic>(Inst)) { continue;
++NumDeadInst; if (!isa<DbgInfoIntrinsic>(Inst)) {
MadeIRChange = true; ++NumDeadInst;
} MadeIRChange = true;
Inst->eraseFromParent();
} }
Inst->eraseFromParent();
} }
}
} }
while (!Worklist.isEmpty()) { while (!Worklist.isEmpty()) {