mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 02:33:44 +00:00
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
This commit is contained in:
parent
d1e36dedb5
commit
cbe003b243
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user