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

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 08:27:53 PDT 2019


aprantl added inline comments.


================
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 &&
----------------
djtodoro wrote:
> aprantl wrote:
> > dstenb wrote:
> > > 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.
> > I see. Could you please add this to the comment here, so it's clear why the restriction exists and how to lift it in the future?
> >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.
> 
> We also wanted to ensure that LLVM currently only generates entry values of size 1.
Is there another reason for this other than that it happened to be hard to implement in LLVM at the time? Perhaps on the consumer side?


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