[DebugInfo] Produce variadic DBG_INSTR_REFs from ISel
authorStephen Tozer <Stephen.Tozer@Sony.com>
Tue, 3 Jan 2023 18:13:31 +0000 (18:13 +0000)
committerStephen Tozer <Stephen.Tozer@Sony.com>
Mon, 9 Jan 2023 08:58:33 +0000 (08:58 +0000)
commitda0faa0594b9df6d401d1e5686ff32766148b075
tree274480f80991ac2df684763d5b4db2327a92d4b8
parent570bf972f5adf05438c7e08d693bf4b96bfd510a
[DebugInfo] Produce variadic DBG_INSTR_REFs from ISel

This patch modifies SelectionDAG and FastISel to produce DBG_INSTR_REFs with
variadic expressions, and produce DBG_INSTR_REFs for debug values with variadic
location expressions. The former essentially means just prepending
DW_OP_LLVM_arg, 0 to the existing expression. The latter is achieved in
MachineFunction::finalizeDebugInstrRefs and InstrEmitter::EmitDbgInstrRef.

Reviewed By: jmorse, Orlando

Differential Revision: https://reviews.llvm.org/D133929
15 files changed:
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/lib/CodeGen/MachineFunction.cpp
llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/test/CodeGen/X86/pr57673.ll
llvm/test/DebugInfo/X86/arg-dbg-value-list.ll
llvm/test/DebugInfo/X86/dbg-val-list-undef.ll
llvm/test/DebugInfo/X86/instr-ref-sdag-empty-vreg.ll
llvm/test/DebugInfo/X86/instr-ref-selectiondag.ll
llvm/test/DebugInfo/X86/invalidated-dbg-value-is-undef.ll
llvm/test/DebugInfo/X86/safestack-byval.ll
llvm/unittests/IR/MetadataTest.cpp