diff options
| author | Jack Andersen <jackoalan@gmail.com> | 2021-12-05 14:55:20 -0500 |
|---|---|---|
| committer | Jack Andersen <jackoalan@gmail.com> | 2021-12-05 15:55:59 -0500 |
| commit | f108c7f59dfae5fafbb00fbdef7a0cd31826dcfc (patch) | |
| tree | aa88062fe53569e594ed7e536ccb3f80736c5f80 /llvm/lib/CodeGen/MachineCombiner.cpp | |
| parent | 1b44364714981017302f182583a43fda4d28e0eb (diff) | |
[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.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp index e2b6cfe55c16..0f94d25ee4f4 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) |
