mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 02:33:44 +00:00
Getting ADCE to interact well with unreachable instructions seems like a nontrivial
exercise that I'm not interested in tackling right now. Just punt and treat them like unwind's. This 'fixes' test/Regression/Transforms/ADCE/unreachable-function.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17106 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
559069d46d
commit
c7ff6c8029
@ -233,8 +233,9 @@ bool ADCE::doADCE() {
|
||||
markInstructionLive(I);
|
||||
}
|
||||
} else if (I->mayWriteToMemory() || isa<ReturnInst>(I) ||
|
||||
isa<UnwindInst>(I)) {
|
||||
// Unreachable instructions are not marked intrinsically live here.
|
||||
isa<UnwindInst>(I) || isa<UnreachableInst>(I)) {
|
||||
// FIXME: Unreachable instructions should not be marked intrinsically
|
||||
// live here.
|
||||
markInstructionLive(I);
|
||||
} else if (isInstructionTriviallyDead(I)) {
|
||||
// Remove the instruction from it's basic block...
|
||||
|
Loading…
x
Reference in New Issue
Block a user