<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 26, 2013 at 9:36 AM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Feb 26, 2013, at 9:16 AM, Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>> wrote:<br>

> On Feb 25, 2013, at 5:02 PM, John McCall <<a href="mailto:rjmccall@apple.com">rjmccall@apple.com</a>> wrote:<br>
>> On Feb 25, 2013, at 4:55 PM, Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>> wrote:<br>
>>> here’s another patch for review:<br>
>>><br>
>>> Allocate stack storage for .block_descriptor and captured self.<br>
>>> This way the register allocator will not optimize away the the<br>
>>> debug info for captured variables.<br>
>><br>
>> Allocating stack storage is not the right way to fix this problem.<br>
>> The frontend is emitting the right intrinsics to say that the argument<br>
>> is being kept in an LLVM value, not in memory.  If that's not working,<br>
>> then basically all optimized debug info is useless.<br>
><br>
> 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?<br>

<br>
</div>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.<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div style>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.</div>
<div style><br></div><div style>-eric </div></div><br></div></div>