[all-commits] [llvm/llvm-project] 157558: [LiveDebugValues][InstrRef][2/2] Emit entry value ...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Wed Jun 30 15:08:17 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1575583f2ad9c8f519ea96e44b900a62493cf7bf
      https://github.com/llvm/llvm-project/commit/1575583f2ad9c8f519ea96e44b900a62493cf7bf
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2021-06-30 (Wed, 30 Jun 2021)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
    M llvm/test/DebugInfo/ARM/entry-value-multi-byte-expr.ll
    M llvm/test/DebugInfo/MIR/Hexagon/live-debug-values-bundled-entry-values.mir
    M llvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir
    M llvm/test/DebugInfo/MIR/X86/debug-entry-value-operation.mir
    M llvm/test/DebugInfo/MIR/X86/entry-value-of-modified-param.mir
    M llvm/test/DebugInfo/MIR/X86/entry-values-diamond-bbs.mir
    M llvm/test/DebugInfo/MIR/X86/kill-entry-value-after-diamond-bbs.mir
    M llvm/test/DebugInfo/MIR/X86/live-debug-values-entry-transfer.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_load_in_loop.mir
    M llvm/test/DebugInfo/MIR/X86/multiple-param-dbg-value-entry.mir
    M llvm/test/DebugInfo/MIR/X86/propagate-entry-value-cross-bbs.mir
    M llvm/test/DebugInfo/Mips/dw_op_entry_value_32bit.ll
    M llvm/test/DebugInfo/Mips/dw_op_entry_value_64bit.ll
    M llvm/test/DebugInfo/Sparc/entry-value-complex-reg-expr.ll
    M llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll
    M llvm/test/DebugInfo/X86/no-entry-values-with-O0.ll

  Log Message:
  -----------
  [LiveDebugValues][InstrRef][2/2] Emit entry value variable locations

This patch adds support to the instruction-referencing LiveDebugValues
implementation for emitting entry values. The instruction referencing
implementations tracking by value rather than location means that we can
get around two of the issues with VarLocs. DBG_VALUE instructions that
re-assign the same value to a variable are no longer a problem, because we
can "see through" to the value being assigned. We also don't need to do
anything special during the dataflow stages: the "variable value problem"
doesn't need to know whether a value is available most of the time, and the
times it deoes need to know are always when entry values need to be
terminated.

The patch modifies the "TransferTracker" class, adding methods to identify
when a variable ias an entry value candidate, and when a machine value is
an entry value. recoverAsEntryValue tests these two things and emits an
entry-value expression if they're true. It's used when we clobber or
otherwise lose a value and can't find a replacement location for the value
it contained.

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




More information about the All-commits mailing list