Page MenuHomePhabricator

[DebugInstrRef][3/9] Create DBG_INSTR_REFs in SelectionDAG

Authored by jmorse on Aug 11 2020, 9:25 AM.



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.

Diff Detail

Event Timeline

jmorse created this revision.Aug 11 2020, 9:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2020, 9:25 AM
jmorse requested review of this revision.Aug 11 2020, 9:25 AM
aprantl accepted this revision.Aug 19 2020, 8:40 AM
This revision is now accepted and ready to land.Aug 19 2020, 8:40 AM
This revision was landed with ongoing or failed builds.Oct 14 2020, 6:25 AM
This revision was automatically updated to reflect the committed changes.