[PATCH] Allocate stack storage for .block_descriptor and captured self.

Eric Christopher echristo at gmail.com
Tue Feb 26 09:40:22 PST 2013


On Tue, Feb 26, 2013 at 9:36 AM, John McCall <rjmccall at apple.com> wrote:

> On Feb 26, 2013, at 9:16 AM, Adrian Prantl <aprantl at apple.com> wrote:
> > On Feb 25, 2013, at 5:02 PM, John McCall <rjmccall at apple.com> wrote:
> >> On Feb 25, 2013, at 4:55 PM, Adrian Prantl <aprantl at apple.com> wrote:
> >>> here’s another patch for review:
> >>>
> >>> Allocate stack storage for .block_descriptor and captured self.
> >>> This way the register allocator will not optimize away the the
> >>> debug info for captured variables.
> >>
> >> Allocating stack storage is not the right way to fix this problem.
> >> The frontend is emitting the right intrinsics to say that the argument
> >> is being kept in an LLVM value, not in memory.  If that's not working,
> >> then basically all optimized debug info is useless.
> >
> > Just to provide you with more details: The problem manifested itself
> even at -O0 because the DebugValue would be kicked out by
> RegAllocFast.cpp:855 under high register pressure (I think). Is there
> another, better way to force the DebugValue to survive register allocation?
>
> Is the value being lost completely (because it's no longer live), or is it
> just being moved between registers or spilled?  Because it seems to me that
> it's a perfectly reasonable request to make of register allocation that it
> not drop debug info for live values.
>
>
Agreed. And there are ways to handle "this value is no longer live" in
debug information as well. Ultimately this comes down to the backend
dropping location information and needs to be fixed there.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130226/78d94103/attachment.html>


More information about the cfe-commits mailing list