[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:
Daniel Sanders 2020-04-17 11:42:53 -07:00
parent 5ef64bbf7a
commit 701af684f6
1 changed files with 2 additions and 2 deletions

View File

@ -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;