[all-commits] [llvm/llvm-project] 536b9e: [DebugInfo][InstrRef] Add extra indirection for NR...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Thu Nov 25 13:44:44 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 536b9eb31e9333bcee3d20d694f7cb12d1ff3d89
      https://github.com/llvm/llvm-project/commit/536b9eb31e9333bcee3d20d694f7cb12d1ff3d89
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2021-11-25 (Thu, 25 Nov 2021)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
    M llvm/test/DebugInfo/X86/spill-indirect-nrvo.ll
    M llvm/test/DebugInfo/X86/spill-nontrivial-param.ll

  Log Message:
  -----------
  [DebugInfo][InstrRef] Add extra indirection for NRVO tests

In some scenarios, usually involving NRVO, we can issue indirect DBG_VALUEs
after SelectionDAG, even in instruction referencing mode (if the variable
is an argument). If the corresponding argument value is spilt to the stack,
then we have:
 * Indirection from it being on the stack,
 * Indirection from it being a dbg.declare or a dbg.addr.

However InstrRefBasedLDV only emits one level of indirection. This patch
adds the second, by adding an extra DW_OP_deref if necessary. The two
tests modified fail otherwise -- they feature some NRVO, and require two
levels of indirection to be correct.

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




More information about the All-commits mailing list