[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.
Wolfgang Pieb via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 9 13:26:54 PDT 2016
wolfgangp added a comment.
In https://reviews.llvm.org/D23283#510350, @aprantl wrote:
> 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.
But doesn't lowerDbgDeclare() generate dbg.value intrinsics for all uses from the list of dbg.declares? That way they are exposed to the 3 passes.
https://reviews.llvm.org/D23283
More information about the llvm-commits
mailing list