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.
I'd primary describe the properties as constraints on the MIR. (And only mention passes secondary to motivate things):