aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2020-04-17 11:39:54 -0700
committerDaniel Sanders <daniel_l_sanders@apple.com>2020-04-17 13:45:44 -0700
commit5ef64bbf7ac47028d80f0ee71b7636e80b6b419b (patch)
treeb510fcf3a0e97743e53b12ada5edc2a61e290e17
parent7f7f98b154484a90d4f2850a19dfc0a6d03ef70c (diff)
downloadllvm-5ef64bbf7ac47028d80f0ee71b7636e80b6b419b.zip
llvm-5ef64bbf7ac47028d80f0ee71b7636e80b6b419b.tar.gz
llvm-5ef64bbf7ac47028d80f0ee71b7636e80b6b419b.tar.bz2
[globalisel][legalizer] Include newly-dead code in artifact combine checks for DebugLoc loss
This dead code deletion is part of the combine and the combine results should account for their locations.
-rw-r--r--llvm/lib/CodeGen/GlobalISel/Legalizer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
index 823dcee..e00d4fb 100644
--- a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
@@ -283,15 +283,14 @@ Legalizer::legalizeMachineFunction(MachineFunction &MF, const LegalizerInfo &LI,
if (ArtCombiner.tryCombineInstruction(MI, DeadInstructions,
WrapperObserver)) {
WorkListObserver.printNewInstrs();
- LocObserver.checkpoint(
- VerifyDebugLocs ==
- DebugLocVerifyLevel::LegalizationsAndArtifactCombiners);
for (auto *DeadMI : DeadInstructions) {
LLVM_DEBUG(dbgs() << *DeadMI << "Is dead\n");
RemoveDeadInstFromLists(DeadMI);
DeadMI->eraseFromParentAndMarkDBGValuesForRemoval();
}
- LocObserver.checkpoint();
+ LocObserver.checkpoint(
+ VerifyDebugLocs ==
+ DebugLocVerifyLevel::LegalizationsAndArtifactCombiners);
Changed = true;
continue;
}