[PATCH] D84113: [Debuginfo] (1/8) [DW_OP_implicit_pointer/second strategy] Support for DW_OP_LLVM_implicit_pointer
Alok Kumar Sharma via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 02:33:00 PDT 2020
alok marked an inline comment as done.
alok added inline comments.
================
Comment at: llvm/lib/IR/DebugInfoMetadata.cpp:1025
+ // and it has one argument.
+ return (I == expr_op_begin()) && (getNumElements() == 2);
+ }
----------------
dblaikie wrote:
> Probably need to have test coverage for these invalid cases
>
> (& I'm not quite clear on the reasoning for where this can appear (why only at the beginning? I would've naively guessed maybe only at the end? (top of the stack) but haven't thought it through in any great detail, for sure - making sure it generalizes over multiple lost indirection would be great (I guess given the DWARF format, it can't generalize over parts of an object lacking indirection, but maybe it'd be nice if the IR format supported it (eg: "struct x { int y; int *z; }" if 'z' no longer has pointable storage - can we still describe what it points to, while also describing the value of 'y'?))
Thanks for your comment. I shall add the invalid test cases.
Transformation of these operators are
DW_OP_LLVM_explicit_pointer (Generated by optimization phases), which is later converted to DW_OP_LLVM_implicit_pointer and which is finally converted to DW_OP_implicit_pointer.
DW_OP_LLVM_explicit_pointer is not bound by condition of appearing only at start. these are later converted to implicit_pointer versions to conform to DWARF standard.
I shall look into the use-case explained by you.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84113/new/
https://reviews.llvm.org/D84113
More information about the llvm-commits
mailing list