HomePhabricator

[DebugInstrRef] Create DBG_INSTR_REFs in SelectionDAG

Authored by jmorse on Oct 14 2020, 6:16 AM.

Description

[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

Details

Committed
jmorseOct 14 2020, 6:24 AM
Differential Revision
D85747: [DebugInstrRef][3/9] Create DBG_INSTR_REFs in SelectionDAG
Parents
rGe6b4179c5d28: Fix a broken build for gcc <= 7.1
Branches
Unknown
Tags
Unknown