Skip to content

Commit

Permalink
[globalisel][legalizer] Expect to lose DebugLocs in dead code
Browse files Browse the repository at this point in the history
There's not really anything else that can be done with them.
Fortunately, this dead code cleanup doesn't seem to trigger
very often.
  • Loading branch information
dsandersllvm committed Apr 17, 2020
1 parent 5ef64bb commit 701af68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 701af68

Please sign in to comment.