[PATCH] D23283: Debugging of optimized code: When locals have their address taken as part of a call use their stack slots as location expressions for debug info.

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 9 12:58:24 PDT 2016


aprantl added a comment.

In https://reviews.llvm.org/D23283#510252, @wolfgangp wrote:

> In https://reviews.llvm.org/D23283#509185, @majnemer wrote:
>
> > Does this do the right thing if the stack offset is reused for another purpose via the lifetime intrinsics?
>
>
> If a stack slot is reused for something else one of the later passes (LiveDebugVariables, LiveDebugValues or DbgValueHistoryCalculator) should detect this and generate the correct location info. That said, in my - admittedly simple - examples I haven't seen a case where stack slots are actually shared between different stack objects (user variables is what we're interested here), so it's possible I have missed something.


This is true if the stack slot is represented by a DBG_VALUE. If it is stored in the MMI table (together with the other dbg.declares) none of these passes even see it.


https://reviews.llvm.org/D23283





More information about the llvm-commits mailing list