[PATCH] DebugInfo: SROA on references should result in undef dbg.values

Eric Christopher echristo at gmail.com
Tue Aug 12 07:19:19 PDT 2014


On Aug 12, 2014 7:17 AM, "David Blaikie" <dblaikie at gmail.com> wrote:
>
> >>! In D3714#11, @echristo wrote:
> > The debug info side of things sounds ok for now, it might be nice to
figure out some way to represent the value in the future with the type.
>
> Yeah - I believe that's in the territory of DWARF
extensions/improvements. For now, so far as I understand DWARF, you can
only describe the value of the variable (a pointer in this case, and
something we don't have anymore - we'd need the opposite of DW_OP_deref
(DW_OP_addr_of?)). Not sure if this overlaps with the broader problem of
things like Argument Promotion, but I think it does.

Correct.

>
> Prior to that, though, we may need a better structured representation of
addresses - I know, for example, that a screwed up when fixing the
pass-by-non-trivial-copy (fixing the bug where we described those
parameters as references instead of values) - by tagging the DIVariable
itself with the "indirect" flag. That's no good in cases like this - we'll
need to be able to add/remove such description on a per-variable-instance
basis, so it should go in the dbg.value/declare/whatnot in a way that
things like ArgPromo can see it and remove it if they get fancy (hey, we
inlined your copy ctor/dtor and found nothing interesting, so we promoted
your pass-by-non-trivial-copy to a trivial copy, but we can still describe
the location of that variable, etc... - we still have the issue with "how
does the debugger call this function now that it doesn't match the ABI"
which we've also bantered about a bit)

Yep.

-eric
>
> http://reviews.llvm.org/D3714
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140812/2713c8ea/attachment.html>


More information about the llvm-commits mailing list