aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineCombiner.cpp
diff options
context:
space:
mode:
authorJack Andersen <jackoalan@gmail.com>2021-12-05 14:55:20 -0500
committerJack Andersen <jackoalan@gmail.com>2021-12-05 15:55:59 -0500
commitf108c7f59dfae5fafbb00fbdef7a0cd31826dcfc (patch)
treeaa88062fe53569e594ed7e536ccb3f80736c5f80 /llvm/lib/CodeGen/MachineCombiner.cpp
parent1b44364714981017302f182583a43fda4d28e0eb (diff)
downloadllvm-f108c7f59dfae5fafbb00fbdef7a0cd31826dcfc.zip
llvm-f108c7f59dfae5fafbb00fbdef7a0cd31826dcfc.tar.gz
llvm-f108c7f59dfae5fafbb00fbdef7a0cd31826dcfc.tar.bz2
[GlobalISel] Allow DBG_VALUE to use undefined vregs before LiveDebugValues.
Expanding on D109750. Since `DBG_VALUE` instructions have final register validity determined in `LDVImpl::handleDebugValue`, there is no apparent reason to immediately prune unused register operands as their defs are erased. Consequently, this renders `MachineInstr::eraseFromParentAndMarkDBGValuesForRemoval` moot; gaining a substantial performance improvement. The only necessary changes involve making relevant passes consider invalid DBG_VALUE vregs uses as valid. Reviewed By: MatzeB Differential Revision: https://reviews.llvm.org/D112852
Diffstat (limited to 'llvm/lib/CodeGen/MachineCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp
index e2b6cfe..0f94d25 100644
--- a/llvm/lib/CodeGen/MachineCombiner.cpp
+++ b/llvm/lib/CodeGen/MachineCombiner.cpp
@@ -485,7 +485,7 @@ static void insertDeleteInstructions(MachineBasicBlock *MBB, MachineInstr &MI,
MBB->insert((MachineBasicBlock::iterator)&MI, InstrPtr);
for (auto *InstrPtr : DelInstrs) {
- InstrPtr->eraseFromParentAndMarkDBGValuesForRemoval();
+ InstrPtr->eraseFromParent();
// Erase all LiveRegs defined by the removed instruction
for (auto I = RegUnits.begin(); I != RegUnits.end(); ) {
if (I->MI == InstrPtr)