[all-commits] [llvm/llvm-project] 63cc25: [DebugInfo][InstrRef][4/4] Support DBG_INSTR_REF t...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Thu Jul 8 08:42:42 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 63cc251eb949b7879919d505dbe375b1cd038781
      https://github.com/llvm/llvm-project/commit/63cc251eb949b7879919d505dbe375b1cd038781
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2021-07-08 (Thu, 08 Jul 2021)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugVariables.cpp
    M llvm/lib/CodeGen/LiveIntervals.cpp
    M llvm/lib/CodeGen/MachineSink.cpp
    M llvm/lib/CodeGen/RegisterCoalescer.cpp
    M llvm/lib/CodeGen/RegisterPressure.cpp
    M llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/Target/X86/X86InstrInfo.cpp
    M llvm/test/DebugInfo/MIR/InstrRef/phi-coalesce-subreg.mir
    M llvm/test/DebugInfo/MIR/InstrRef/phi-coalescing.mir
    M llvm/test/DebugInfo/MIR/InstrRef/phi-regallocd-to-stack.mir
    M llvm/test/DebugInfo/MIR/InstrRef/phi-through-regalloc.mir
    A llvm/test/DebugInfo/MIR/InstrRef/x86-drop-compare-inst.mir

  Log Message:
  -----------
  [DebugInfo][InstrRef][4/4] Support DBG_INSTR_REF through all backend passes

This is a cleanup patch -- we're now able to support all flavours of
variable location in instruction referencing mode. This patch updates
various tests for debug instructions to be broader: numerous code paths
try to ignore debug isntructions, and they now have to ignore the
additional DBG_PHI and DBG_INSTR_REFs that we can generate.

A small amount of rework happens for LiveDebugVariables: as we don't need
to track live intervals through regalloc any more, we can get away with
unlinking debug instructions before regalloc, then re-inserting them after.
Note that this isn't (yet) true of DBG_VALUE_LISTs, they still have to go
through live interval tracking.

In SelectionDAG, add a helper lambda that emits half-formed DBG_INSTR_REFs
for arguments in instr-ref mode, DBG_VALUE otherwise. This is one of the
final locations where DBG_VALUEs are emitted for vreg arguments.

X86InstrInfo now un-sets the debug instr number on SUB instructions that
get mutated into CMP instructions. As the instruction no longer computes a
subtraction, we can't use it for variable locations.

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




More information about the All-commits mailing list