diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-09-01 21:29:49 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-09-01 21:29:49 +0000 |
commit | 6bb4e7e8e8c39432c890bedb800bb01f6eda1e44 (patch) | |
tree | 63be6ccd6d83d79c47f2befe442ea2c41e63805f /lib/Transforms/InstCombine | |
parent | c8c0fd39931491146efd08d7ac835f2839e41b1e (diff) | |
download | llvm-6bb4e7e8e8c39432c890bedb800bb01f6eda1e44.tar.gz llvm-6bb4e7e8e8c39432c890bedb800bb01f6eda1e44.tar.bz2 llvm-6bb4e7e8e8c39432c890bedb800bb01f6eda1e44.tar.xz |
Reduce indentation. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r-- | lib/Transforms/InstCombine/InstructionCombining.cpp | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp index 208375b482..d9646588d5 100644 --- a/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -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 // unreachable, remove any instructions inside of them. This prevents // the instcombine code from having to deal with some bad special cases. - for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) - if (!Visited.count(BB)) { - // Delete the instructions backwards, as it has a reduced likelihood of - // having to update as many def-use and use-def chains. - for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) { - Instruction *Inst = &*I++; - if (isa<TerminatorInst>(Inst)) - break; - if (!Inst->use_empty()) - Inst->replaceAllUsesWith(UndefValue::get(Inst->getType())); - if (isa<LandingPadInst>(Inst)) - continue; - if (!isa<DbgInfoIntrinsic>(Inst)) { - ++NumDeadInst; - MadeIRChange = true; - } - Inst->eraseFromParent(); + for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++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. + for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) { + Instruction *Inst = &*I++; + if (isa<TerminatorInst>(Inst)) + break; + if (!Inst->use_empty()) + Inst->replaceAllUsesWith(UndefValue::get(Inst->getType())); + if (isa<LandingPadInst>(Inst)) + continue; + if (!isa<DbgInfoIntrinsic>(Inst)) { + ++NumDeadInst; + MadeIRChange = true; } + Inst->eraseFromParent(); } + } } while (!Worklist.isEmpty()) { |