mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
A couple misc fixes so that bugpoint doesn't explode reducing code containing landingpads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143435 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -401,7 +401,8 @@ bool ReduceCrashingInstructions::TestInsts(std::vector<const Instruction*>
|
|||||||
for (Function::iterator FI = MI->begin(), FE = MI->end(); FI != FE; ++FI)
|
for (Function::iterator FI = MI->begin(), FE = MI->end(); FI != FE; ++FI)
|
||||||
for (BasicBlock::iterator I = FI->begin(), E = FI->end(); I != E;) {
|
for (BasicBlock::iterator I = FI->begin(), E = FI->end(); I != E;) {
|
||||||
Instruction *Inst = I++;
|
Instruction *Inst = I++;
|
||||||
if (!Instructions.count(Inst) && !isa<TerminatorInst>(Inst)) {
|
if (!Instructions.count(Inst) && !isa<TerminatorInst>(Inst) &&
|
||||||
|
!isa<LandingPadInst>(Inst)) {
|
||||||
if (!Inst->getType()->isVoidTy())
|
if (!Inst->getType()->isVoidTy())
|
||||||
Inst->replaceAllUsesWith(UndefValue::get(Inst->getType()));
|
Inst->replaceAllUsesWith(UndefValue::get(Inst->getType()));
|
||||||
Inst->eraseFromParent();
|
Inst->eraseFromParent();
|
||||||
@ -574,6 +575,9 @@ static bool DebugACrash(BugDriver &BD,
|
|||||||
} else {
|
} else {
|
||||||
if (BugpointIsInterrupted) goto ExitLoops;
|
if (BugpointIsInterrupted) goto ExitLoops;
|
||||||
|
|
||||||
|
if (isa<LandingPadInst>(I))
|
||||||
|
continue;
|
||||||
|
|
||||||
outs() << "Checking instruction: " << *I;
|
outs() << "Checking instruction: " << *I;
|
||||||
Module *M = BD.deleteInstructionFromProgram(I, Simplification);
|
Module *M = BD.deleteInstructionFromProgram(I, Simplification);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user