[PATCH] D114440: [DebugInfo][InstrRef] Account for additional indirection from dbg.declares in SelectionDAG

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 23 07:23:15 PST 2021


jmorse created this revision.
jmorse added reviewers: StephenTozer, Orlando, TWeaver, djtodoro.
Herald added a subscriber: hiraditya.
jmorse requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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. Adds test too.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114440

Files:
  llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
  llvm/test/DebugInfo/X86/instr-ref-dbg-declare.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114440.389194.patch
Type: text/x-patch
Size: 7685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211123/77c7b3f9/attachment.bin>


More information about the llvm-commits mailing list