llvm-project/llvm/test/DebugInfo/MIR
Jeremy Morse 8496fc2ec8 [DebugInstrRef][1/3] Track PHI values through register allocation
This patch introduces "DBG_PHI" instructions, a marker of where a PHI
instruction used to be, before PHI elimination. Under the instruction
referencing model, we want to know where every value in the function is
defined -- and a PHI, even if implicit, is such a place.

Just like instruction numbers, we can use this to identify a value to be
used as a variable value, but we don't need to know what instruction
defines that value, for example:

bb1:
   DBG_PHI $rax, 1
   [... more insts ... ]
bb2:
   DBG_INSTR_REF 1, 0, !1234, !DIExpression()

This specifies that on entry to bb1, whatever value is in $rax is known
as value number one -- and the later DBG_INSTR_REF marks the position
where variable !1234 should take on value number one.

PHI locations are stored in MachineFunction for the duration of the
regalloc phase in the DebugPHIPositions map. The map is populated by
PHIElimination, and then flushed back into the instruction stream by
virtregrewriter. A small amount of maintenence is needed in
LiveDebugVariables to account for registers being split, but only for
individual positions, not for entire ranges of blocks.

Differential Revision: https://reviews.llvm.org/D86812
2021-05-26 20:24:00 +01:00
..
AArch64 [DwarfDebug] Improve single location detection in validThroughout (2/4) 2020-08-27 11:52:29 +01:00
ARM llvm-dwarfdump: Dump address forms in their encoded length rather than always in 64 bits 2020-10-04 15:48:57 -07:00
Hexagon llvm-dwarfdump: Dump address forms in their encoded length rather than always in 64 bits 2020-10-04 15:48:57 -07:00
InstrRef [DebugInstrRef][1/3] Track PHI values through register allocation 2021-05-26 20:24:00 +01:00
Mips [CSInfo][MIPS] Update CSInfo in delay slot filler 2021-01-18 15:29:59 +01:00
SystemZ [SystemZ] Separate LoZ ELF specifics in tablegen. 2021-02-17 16:11:58 -05:00
X86 [DebugInfo] Process DBG_VALUE_LIST in LiveDebugVariables 2021-03-10 12:37:59 +00:00
lit.local.cfg