[PATCH] D85747: [DebugInstrRef][3/9] Create DBG_INSTR_REFs in SelectionDAG

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 09:25:50 PDT 2020


jmorse created this revision.
jmorse added a reviewer: debug-info.
Herald added subscribers: llvm-commits, hiraditya, MatzeB.
Herald added a project: LLVM.
jmorse requested review of this revision.
Herald added a subscriber: ormris.

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, which I'd prefer to not address in this first patch series.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85747

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85747.284784.patch
Type: text/x-patch
Size: 8963 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200811/b57a7015/attachment.bin>


More information about the llvm-commits mailing list