diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-08-19 21:52:06 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-08-19 21:52:06 +0000 |
commit | cbe003b243c5aa0ca7ec3872164a5e53950ba44f (patch) | |
tree | d9c43060b163378757548ce35bcfbd76a02b29ed /lib/Transforms/Scalar/ADCE.cpp | |
parent | d1e36dedb5c0a79cdaa91e608509674180a951dd (diff) | |
download | external_llvm-cbe003b243c5aa0ca7ec3872164a5e53950ba44f.zip external_llvm-cbe003b243c5aa0ca7ec3872164a5e53950ba44f.tar.gz external_llvm-cbe003b243c5aa0ca7ec3872164a5e53950ba44f.tar.bz2 |
The landingpad instruction isn't dead simply because it's value isn't used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138102 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/ADCE.cpp')
-rw-r--r-- | lib/Transforms/Scalar/ADCE.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index a5adb5e..ba214d1 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -57,6 +57,7 @@ bool ADCE::runOnFunction(Function& F) { for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) if (isa<TerminatorInst>(I.getInstructionIterator()) || isa<DbgInfoIntrinsic>(I.getInstructionIterator()) || + isa<LandingPadInst>(I.getInstructionIterator()) || I->mayHaveSideEffects()) { alive.insert(I.getInstructionIterator()); worklist.push_back(I.getInstructionIterator()); @@ -65,7 +66,6 @@ bool ADCE::runOnFunction(Function& F) { // Propagate liveness backwards to operands. while (!worklist.empty()) { Instruction* curr = worklist.pop_back_val(); - for (Instruction::op_iterator OI = curr->op_begin(), OE = curr->op_end(); OI != OE; ++OI) if (Instruction* Inst = dyn_cast<Instruction>(OI)) |