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

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 04:51:49 PDT 2022


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

Refreshed with a more comprehensive test plan -- see deref-spills-with-size.mir where there's a truth-table (well, kind of) of what inputs should lead to what output expressions, for:

- Different sizes of value on the stack,
- The differing presence of stack values / no stack value,
- Whether the variable is a scalar or a fragment.

It would be nice to design some of this decision making out of DIExpression in the future, but that's for another time. This will want a little more review, as I've made one further change. For fragments with no size mistmatch, we might be able to use a DW_OP_deref and let the consumer work out "DW_OP_piece says 4 bytes, so we should dereference a 4 byte value". However it's better to be explicit and use a DW_OP_deref_size rather than leaving it to interpretation.


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/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.424871.patch
Type: text/x-patch
Size: 29779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220425/cb1e507f/attachment.bin>


More information about the llvm-commits mailing list