[all-commits] [llvm/llvm-project] a20987: [DebugInfo][InstrRef] Add indirection from dbg.dec...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Mon Nov 29 14:25:05 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a20987adf4f80e2657eb3032a5a91e13f58106a0
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2021-11-29 (Mon, 29 Nov 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
    A llvm/test/DebugInfo/X86/instr-ref-dbg-declare.ll

  Log Message:
  [DebugInfo][InstrRef] Add indirection from dbg.declare in SelectionDAG

Usually dbg.declares get translated into either entries in an MF
side-table, or a DBG_VALUE on entry to the function with IsIndirect set
(including in instruction referencing mode). Much rarer is a dbg.declare
attached to a non-argument value, such as in the test added in this patch
where there's a variable-length-array. Such dbg.declares become SDDbgValue
nodes with InIndirect=true.

As it happens, we weren't correctly emitting DBG_INSTR_REFs with the
additional indirection. This patch adds the extra indirection, encoded as
adding an additional DW_OP_deref to the expression.

Differential Revision: https://reviews.llvm.org/D114440

More information about the All-commits mailing list