forked from OSchip/llvm-project
[globalisel][legalizer] Expect to lose DebugLocs in dead code
There's not really anything else that can be done with them. Fortunately, this dead code cleanup doesn't seem to trigger very often.
This commit is contained in:
parent
5ef64bbf7a
commit
701af684f6
|
@ -225,7 +225,7 @@ Legalizer::legalizeMachineFunction(MachineFunction &MF, const LegalizerInfo &LI,
|
|||
if (isTriviallyDead(MI, MRI)) {
|
||||
LLVM_DEBUG(dbgs() << MI << "Is dead; erasing.\n");
|
||||
MI.eraseFromParentAndMarkDBGValuesForRemoval();
|
||||
LocObserver.checkpoint();
|
||||
LocObserver.checkpoint(false);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -275,7 +275,7 @@ Legalizer::legalizeMachineFunction(MachineFunction &MF, const LegalizerInfo &LI,
|
|||
LLVM_DEBUG(dbgs() << MI << "Is dead\n");
|
||||
RemoveDeadInstFromLists(&MI);
|
||||
MI.eraseFromParentAndMarkDBGValuesForRemoval();
|
||||
LocObserver.checkpoint();
|
||||
LocObserver.checkpoint(false);
|
||||
continue;
|
||||
}
|
||||
SmallVector<MachineInstr *, 4> DeadInstructions;
|
||||
|
|
Loading…
Reference in New Issue