[PATCH] D79306: llvm rejects DWARF operator DW_OP_push_object_address.

Alok Kumar Sharma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 12:26:09 PDT 2020


alok added a comment.

In D79306#2020789 <https://reviews.llvm.org/D79306#2020789>, @aprantl wrote:

> Thanks a lot for the example!
>
> If `DW_OP_push_object` address is *only* going to be used inside a DISubrange and if it *always* appears at the beginning of a DIExpression bound there, we could make it implicit, the same way the first operator of a "normal" DIExpression in a dbg.value is implicitly specified by the dbg.value.
>
> My motivation behind this is to keep the surface area of DIExpression small. We don't necessarily want to include all DWARF operators in DIExpression, because it would make it harder to emit other debug info formats from it, transform the expression during optimizations, and generally reason about them.
>
> Would changing the backend to emit an automatic DW_OP_push_object before each DIExpression that represents a bound in a DISubrange work for flang, or are there other kinds of bound expressions / reasons why that would be a bad idea?


I understand the concerns for keeping DIExpression small. But considering the DW_OP_push_object_address implicit would prevent the freedom to use expression which don't use this (DW_OP_push_object_address) DWARF operator. If it is big a 'no' for adding DW_OP_push_object_address to DIExpression, then as you suggested I would need DW_OP_LLVM_arg0 from https://reviews.llvm.org/D70642 .


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

https://reviews.llvm.org/D79306





More information about the llvm-commits mailing list