[llvm] 701af68 - [globalisel][legalizer] Expect to lose DebugLocs in dead code
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 17 13:46:04 PDT 2020
Author: Daniel Sanders
Date: 2020-04-17T13:45:44-07:00
New Revision: 701af684f65ddb91b7eef54c0a0d2e93cc2ea4cf
URL: https://github.com/llvm/llvm-project/commit/701af684f65ddb91b7eef54c0a0d2e93cc2ea4cf
DIFF: https://github.com/llvm/llvm-project/commit/701af684f65ddb91b7eef54c0a0d2e93cc2ea4cf.diff
LOG: [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.
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
index e00d4fb7428a..0a2d71c275d5 100644
--- a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
@@ -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;
More information about the llvm-commits
mailing list