[PATCH] D67492: [DebugInfo] Add a DW_OP_LLVM_entry_value operation

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 13:48:19 PDT 2019


dstenb added inline comments.


================
Comment at: llvm/docs/LangRef.rst:4788
+  The first operand of ``DW_OP_LLVM_entry_value`` is the size of following
   DWARF expression.
+  ``DW_OP_LLVM_entry_value`` may appear after the ``LiveDebugValues`` pass.
----------------
aprantl wrote:
> not "DWARF expression" but in terms of std::distance of DIExpression operation iterators, right?
In this patch DW_OP_LLVM_entry_value has the same semantics as the DWARF variant, so the operand still specifies the number of bytes.


================
Comment at: llvm/lib/IR/DebugInfoMetadata.cpp:896
       // of following expression should be 1, because we support only
       // entry values of a simple register location.
       return I->get() == expr_op_begin()->get() && I->getArg(0) == 1 &&
----------------
aprantl wrote:
> Can someone remind me what the reason for this limitation was again? Do we still need it after this patch?
I think that the main (or perhaps only?) reason for this limitation is that we, at emission, currently don't have a good way to calculate the size of the block that the entry value covers, and emit that size as a ULEB128 operand before the block. This patch will not change that.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67492/new/

https://reviews.llvm.org/D67492





More information about the llvm-commits mailing list