This revision was automatically updated to reflect the committed changes.
Closed by commit rG6e39379bbbe1: [DwarfExpression] Support entry values for
indirect parameters (authored by vsk).
Changed prior to commit:
https://reviews.llvm.org/D80345?vs=265815=266337#toc
Repository:
rG LLVM
djtodoro accepted this revision.
djtodoro added a comment.
This revision is now accepted and ready to land.
LGTM, thanks!
Comment at: llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-indirect-param.mir:18
+# CHECK-NEXT: [0x, 0x0010): DW_OP_breg0 W0+0
+#
vsk added a comment.
Apparently, we always describe the value of an indirect parameter as being
"whatever is in the temporary slot", even if the callee modifies it:
https://godbolt.org/z/ZgWr_n. So treating the indirect parameter DBG_VALUE as
pointing to a (modifiable) location sounds
vsk marked 2 inline comments as done.
vsk added inline comments.
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h:151
+IndirectValue = 1 << 1,
+CallSiteParamValue = 1 << 2
+ };
aprantl wrote:
> I'm going to be pedantic now: Should this be
vsk marked an inline comment as done.
vsk added inline comments.
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:790
+// FIXME: This produces unusable descriptions when the register contains
+// a pointer to a temporary copy of a struct passed by value.
vsk updated this revision to Diff 265815.
vsk added a comment.
Address review feedback.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80345/new/
https://reviews.llvm.org/D80345
Files:
djtodoro added inline comments.
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h:149
+EntryValue = 1 << 0,
+IndirectEntryValue = 1 << 1,
+CallSiteParamValue = 1 << 2
vsk wrote:
> aprantl wrote:
> > Would it make more sense call this
djtodoro added a comment.
Great! Thanks!
I think we should update the `LangRef.rst` (entry_values section) as well.
In addition, can we add a test case checking MIR output after `LiveDebugValues`?
Comment at: llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-indirect-param.mir:18
aprantl added inline comments.
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h:151
+IndirectValue = 1 << 1,
+CallSiteParamValue = 1 << 2
+ };
I'm going to be pedantic now: Should this be Indirect instead of IndirectValue?
I.e., can there be
vsk updated this revision to Diff 265594.
vsk marked an inline comment as done.
vsk added a comment.
Address review feedback.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80345/new/
https://reviews.llvm.org/D80345
Files:
vsk updated this revision to Diff 265629.
vsk added a comment.
Remove incorrect fixme.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80345/new/
https://reviews.llvm.org/D80345
Files:
aprantl added inline comments.
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1288
DwarfExpr.addFragmentOffset(DIExpr);
- if (Location.isIndirect())
+ if (Location.isIndirect() && !DIExpr->isEntryValue())
DwarfExpr.setMemoryLocationKind();
vsk marked 2 inline comments as done.
vsk added inline comments.
Comment at: llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-indirect-param.mir:18
+# CHECK-NEXT: [0x, 0x0010): DW_OP_breg0 W0+0
+# CHECK-NEXT: [0x0010, 0x001c):
vsk updated this revision to Diff 265805.
vsk added a comment.
Add test coverage for indirect parameter location with offset; fix typo; fix
LangRef entry.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80345/new/
https://reviews.llvm.org/D80345
vsk marked 11 inline comments as done.
vsk added inline comments.
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1288
DwarfExpr.addFragmentOffset(DIExpr);
- if (Location.isIndirect())
+ if (Location.isIndirect() && !DIExpr->isEntryValue())
vsk created this revision.
vsk added reviewers: djtodoro, aprantl, dstenb.
Herald added subscribers: lldb-commits, hiraditya.
Herald added projects: LLDB, LLVM.
A struct argument can be passed-by-value to a callee via a pointer to a
temporary stack copy. Add support for emitting an entry value
16 matches
Mail list logo