[InstrRef][AArch64][1/4] Accept constant physreg variable locations
authorJeremy Morse <jeremy.morse@sony.com>
Mon, 26 Jul 2021 14:00:08 +0000 (15:00 +0100)
committerJeremy Morse <jeremy.morse@sony.com>
Mon, 26 Jul 2021 14:26:15 +0000 (15:26 +0100)
commitf86694cb808f22253e00742ccd279760ef0c688d
treeeb5d70fd3ecc53c43d16af94a569ad51d5181ad8
parent93664503be6b3f47269cf617f8c46b6ce95f8076
[InstrRef][AArch64][1/4] Accept constant physreg variable locations

Late in SelectionDAG we join up instruction numbers with their defining
instructions, if it couldn't be done during the main part of SelectionDAG.
One exception is function arguments, where we have to point a DBG_PHI
instruction at the incoming live register, as they don't have a defining
instruction. This patch adds another exception, for constant physregs, like
aarch64 has.

It may seem wasteful to use two instructions where we could use a single
DBG_VALUE, however the whole point of instruction referencing is to
decouple the identification of values from the specification of where
variable location ranges start.

(Part of my aarch64 work to ease adoption of  instruction referencing, as
in the meta comment on D104520)

Differential Revision: https://reviews.llvm.org/D104520
llvm/lib/CodeGen/MachineFunction.cpp
llvm/test/DebugInfo/AArch64/instr-ref-const-physreg.ll [new file with mode: 0644]