[PATCH] D66746: [LiveDebugValues] Omit entry values for DBG_VALUEs with pre-existing expressions

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 28 07:39:10 PDT 2019


dstenb added a comment.

In D66746#1648864 <https://reviews.llvm.org/D66746#1648864>, @probinson wrote:

> In D66746#1647732 <https://reviews.llvm.org/D66746#1647732>, @aprantl wrote:
>
> > > I have interpreted the size as meaning the byte size of the DWARF block that the operation will cover. Assuming that, at the time of running LiveDebugValues I don't think there is a good way to query the size of the block that the entry value will cover; we don't know that until we actually emit the DWARF, as far as I can tell. That is why I have assumed that a hard coded operand of 1 is emitted there, with the assumption that only simple register location descriptions are supported.
> >
> > I think it would be reasonable to use the number of opcodes in the DIExpression in LLVM IR and only substitute the number of bytes in AsmPrinter.
>
>
> +1.  The DIExpression is more of an abstracted expression than a true DWARF expression, and even supports non-DWARF opcodes e.g. DW_OP_LLVM_convert.  We can't be treating this as the size of the final expression.


That sounds like a reasonable approach. I can start looking on some patches for that, if no one objects.

Even if the entry value could wrap multiple operations, we would still not want LDV to emit an entry value for the parameter in the attached test case, since the parameter value has been propagated to the callee, but I guess that's another question.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D66746





More information about the llvm-commits mailing list