Skip to content

Commit 701af68

Browse files
committed
[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.
1 parent 5ef64bb commit 701af68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/GlobalISel/Legalizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Legalizer::legalizeMachineFunction(MachineFunction &MF, const LegalizerInfo &LI,
225225
if (isTriviallyDead(MI, MRI)) {
226226
LLVM_DEBUG(dbgs() << MI << "Is dead; erasing.\n");
227227
MI.eraseFromParentAndMarkDBGValuesForRemoval();
228-
LocObserver.checkpoint();
228+
LocObserver.checkpoint(false);
229229
continue;
230230
}
231231

@@ -275,7 +275,7 @@ Legalizer::legalizeMachineFunction(MachineFunction &MF, const LegalizerInfo &LI,
275275
LLVM_DEBUG(dbgs() << MI << "Is dead\n");
276276
RemoveDeadInstFromLists(&MI);
277277
MI.eraseFromParentAndMarkDBGValuesForRemoval();
278-
LocObserver.checkpoint();
278+
LocObserver.checkpoint(false);
279279
continue;
280280
}
281281
SmallVector<MachineInstr *, 4> DeadInstructions;

0 commit comments

Comments
 (0)