[all-commits] [llvm/llvm-project] 68f471: [DebugInstrRef] Convert DBG_INSTR_REFs into variab...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Fri Oct 23 06:50:43 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 68f47157164e0513fb5bf3a4639884c85b8a1308
      https://github.com/llvm/llvm-project/commit/68f47157164e0513fb5bf3a4639884c85b8a1308
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2020-10-23 (Fri, 23 Oct 2020)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
    A llvm/test/DebugInfo/MIR/InstrRef/livedebugvalues_instrref_tolocs.mir

  Log Message:
  -----------
  [DebugInstrRef] Convert DBG_INSTR_REFs into variable locations

Handle DBG_INSTR_REF instructions in LiveDebugValues, to determine and
propagate variable locations. The logic is fairly straight forwards:
Collect a map of debug-instruction-number to the machine value numbers
generated in the first walk through the function. When building the
variable value transfer function and we see a DBG_INSTR_REF, look up the
instruction it refers to, and pick the machine value number it generates,
That's it; the rest of LiveDebugValues continues as normal.

Awkwardly, there are two kinds of instruction numbering happening here: the
offset into the block (which is how machine value numbers are determined),
and the numbers that we label instructions with when generating
DBG_INSTR_REFs.

I've also restructured the TransferTracker redefVar code a little, to
separate some DBG_VALUE specific operations into its own method. The
changes around redefVar should be largely NFC, while allowing
DBG_INSTR_REFs to specify a value number rather than just a location.

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




More information about the All-commits mailing list