[all-commits] [llvm/llvm-project] c4e785: [DebugInstrRef] Create DBG_INSTR_REFs in SelectionDAG

Jeremy Morse via All-commits all-commits at lists.llvm.org
Wed Oct 14 06:25:02 PDT 2020


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

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
    M llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
    M llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
    M llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
    A llvm/test/DebugInfo/X86/instr-ref-selectiondag.ll

  Log Message:
  -----------
  [DebugInstrRef] Create DBG_INSTR_REFs in SelectionDAG

When given the -experimental-debug-variable-locations option (via -Xclang
or to llc), have SelectionDAG generate DBG_INSTR_REF instructions instead
of DBG_VALUE. For now, this only happens in a limited circumstance: when
the value referred to is not a PHI and is defined in the current block.
Other situations introduce interesting problems, addresed in later patches.

Practically, this patch hooks into InstrEmitter and if it can find a
defining instruction for a value, gives it an instruction number, and
points the DBG_INSTR_REF at that <instr, operand> pair.

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




More information about the All-commits mailing list