[PATCH] D75036: [DebugInfo] Describe call site values for chains of expression producing instrs

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 02:39:09 PST 2020


dstenb created this revision.
dstenb added reviewers: djtodoro, aprantl, vsk.
dstenb added a project: debug-info.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

If the describeLoadedValue() hook produced a DIExpression when
describing a instruction, and it was not possible to emit a call site
entry directly (the value operand was not an immediate nor a preserved
register), then that described value could not be inserted into the
worklist, and would instead be dropped, meaning that the parameter's
call site value couldn't be described.

This patch extends the worklist so that each entry has an DIExpression
that is built up when iterating through the instructions.

This allows us to describe instruction chains like this:

  $reg0 = mv $fp
  $reg0 = add $reg0, offset
  call @call_with_offseted_fp

Since DW_OP_LLVM_entry_value operations can't be combined with any other
expression, such call site entries will not be emitted. I have added a
test, dbgcall-site-expr-entry-value.mir, which verifies that we don't
assert or emit broken DWARF in such cases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75036

Files:
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-expr-chain.mir
  llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-expr-entry-value.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75036.246164.patch
Type: text/x-patch
Size: 19627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200224/2ca5f5bb/attachment.bin>


More information about the llvm-commits mailing list