HomePhabricator

[DebugInfo] Clear subreg in setDebugValueUndef()

Authored by dstenb on Oct 22 2020, 8:24 AM.

Description

[DebugInfo] Clear subreg in setDebugValueUndef()

When switching the register debug operands to $noreg in
setupDebugValueUndef() also clear the sub-register indices for virtual
registers. This is done when marking DBG_VALUEs undef in other cases,
e.g. in LiveDebugVariables. I have not found any cases where leaving the
sub-register index causes any issues, and the indices would eventually
get dropped when LiveDebugVariables reinserted the undef DBG_VALUEs
after register scheduling, but if nothing else it looked a bit weird in
printouts to have sub-register indices on $noreg, and I don't think the
sub-register index holds any meaningful information at that point.

I have not been able to find any source-level reproducer for this with
an upstream target, so I have just added an instrumented machine-sink
test.

Reviewed By: djtodoro, jmorse

Differential Revision: https://reviews.llvm.org/D89941

Details

Committed
dstenbOct 22 2020, 11:49 PM
Reviewer
djtodoro
Differential Revision
D89941: [DebugInfo] Clear subreg in setDebugValueUndef()
Parents
rG310a8e1d1284: [llvm-objcopy][NFC] Extract arg parsing logic into a helper function
Branches
Unknown
Tags
Unknown