[PATCH] D60716: [DwarfDebug] Dump call site debug info into DWARF

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 04:48:47 PDT 2019


dstenb added a comment.

In D60716#1580513 <https://reviews.llvm.org/D60716#1580513>, @djtodoro wrote:

> @dstenb  Thanks a lot!
>
> That seems like a good catch and we should support such scenario.
>
> I think that it will be expensive to return a `MachineOperand` object.


The size of MachineOperand is 32 bytes on x86-64, and the class only contains POD fields, so I guess it should be fairly cheap to copy such objects, or initialize them with compile-time known values? Though, perhaps that would still cause a noticeable increase in compilation time.

I think it would be interesting to benchmark that at least.

> Could you please provide us with more info about the case?

Here is an x86-64 reproducer.

  extern void callee(int);
  void caller() { callee(0); }

When compiled using `-O2 -g -Xclang -femit-debug-entry-values` it gives the following instruction to try to describe the parameter with:

  $edi = XOR32rr undef $edi(tied-def 0), undef $edi, implicit-def dead $eflags



> Can we describe such situation through the `DIExpression` instead?

Oh, maybe! Do you have some suggestions for how that could be done?


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

https://reviews.llvm.org/D60716





More information about the llvm-commits mailing list