[PATCH] D51612: [DebugInfo] Handle stack slot offsets for spilled sub-registers in LDV

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 02:03:04 PDT 2018


dstenb created this revision.
dstenb added reviewers: rnk, aprantl, stoklund.
dstenb added a project: debug-info.
Herald added subscribers: llvm-commits, JDevlieghere, nemanjai.

Extend LDV so that stack slot offsets for spilled sub-registers
are added to the emitted debug locations. This is accomplished
by querying InstrInfo::getStackSlotRange().

With this change, LDV will add a DW_OP_plus_uconst operation to
the expression if a sub-register is spilled. Later on, PEI will
add an offset operation for the stack slot, meaning that we will
get expressions of the forms:

- {DW_OP_constu #fp-offset, DW_OP_minus, DW_OP_plus_uconst #subreg-offset}
- {DW_OP_plus_const #fp-offset, DW_OP_minus, DW_OP_plus_uconst #subreg-offset}

The two offset operations should ideally be merged.


Repository:
  rL LLVM

https://reviews.llvm.org/D51612

Files:
  lib/CodeGen/LiveDebugVariables.cpp
  test/CodeGen/PowerPC/live-debug-vars-subreg-offset.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51612.163761.patch
Type: text/x-patch
Size: 13557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180904/c333451a/attachment.bin>


More information about the llvm-commits mailing list