[PATCH] D123599: [DebugInfo][InstrRef] Describe value sizes when spilt to stack

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 09:10:17 PDT 2022


jmorse updated this revision to Diff 426081.
jmorse added a comment.

Thinking about it, actually we can easily support the llvm.dbg.addr with complex-expression scenario, just by weakening the assertion that's firing. The code as written will cope just fine with dbg.addrs that perform a computation, the true problem is when there's a DW_OP_stack_value in the expression. That's what this assertion should have been testing for in the first place. It doesn't make sense for a variable to both be indirect, and computed on the DWARF expression stack.

I've revised the patch to weaken the assertion, and added a test to cover the situation I described, an indirect DBG_VALUE with extra opcodes, but no stack value. There are two dereferences in this situation, and we need to make sure they're performed at the right time.

Paging @Orlando , if you could review the update.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123599/new/

https://reviews.llvm.org/D123599

Files:
  llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
  llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
  llvm/test/DebugInfo/MIR/InstrRef/deref-spills-with-size.mir
  llvm/test/DebugInfo/MIR/InstrRef/follow-spill-of-indir-value.mir
  llvm/test/DebugInfo/MIR/X86/live-debug-values-restore.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_load_in_loop.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123599.426081.patch
Type: text/x-patch
Size: 36841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220429/0fbda663/attachment.bin>


More information about the llvm-commits mailing list