[all-commits] [llvm/llvm-project] 13edfc: [DebugInfo] Clear subreg in setDebugValueUndef()

David via All-commits all-commits at lists.llvm.org
Thu Oct 22 23:51:08 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 13edfcc97d29574d1d38ded4fa9c2af6e6519472
      https://github.com/llvm/llvm-project/commit/13edfcc97d29574d1d38ded4fa9c2af6e6519472
  Author: David Stenberg <david.stenberg at ericsson.com>
  Date:   2020-10-23 (Fri, 23 Oct 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachineInstr.h
    A llvm/test/DebugInfo/MIR/X86/machinesink-subreg.mir

  Log Message:
  -----------
  [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




More information about the All-commits mailing list