<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 25, 2013 at 5:40 PM, 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 style="word-wrap:break-word"><div><div class="h5"><div><div>On Feb 25, 2013, at 5:37 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:</div>
<blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 25, 2013 at 5:34 PM, 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 style="word-wrap:break-word"><div><div><div>On Feb 25, 2013, at 5:14 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:</div>

<blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 25, 2013 at 5:02 PM, 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>On Feb 25, 2013, at 4:55 PM, Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank">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>
</div>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></blockquote><div><br></div><div>That's pretty accurate. The backend in a lot of places is depending upon an</div><div>alloca existing in order to get a location for a variable. To make optimized</div>


<div>debug info work we're going to need to fix that assumption.</div></div></div></div></blockquote><br></div></div><div>When did this become true?  I know that at least *some* debugging used</div><div>to work in blocks, and we haven't been making allocas for them in a while.</div>

<div>Maybe it was a really brittle, but some things used to survive at least to the</div><div>point that GDB could consume them.</div><div><br></div></div></blockquote><div><br></div><div>Nothing has changed as far as debug info, it was just always pretty brittle.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div></div><div>If we *must* do this as a temporary debug info workaround, then the</div>

<div>appropriate solution for things like the block descriptor is to make the</div><div>alloca, slam a value into it, and use that for the debug info intrinsic, but</div><div>not otherwise change IR-generation for the function.</div>

</div></blockquote><div><br></div><div>Agreed, though there's something to be said for not changing it and fixing</div><div>the underlying problems in the backend.</div></div></div></div></blockquote><br></div></div>
</div><div>Right;  the problems in the backend definitely need to be fixed.  I am just</div><div>skeptical that anybody working on the backend cares enough to fix them.</div><div>If we can avoid this workaround, we should.</div>
<span class="HOEnZb"><font color="#888888"><br></font></span></div></blockquote><div><br></div><div style>Mm.. the only problem here is that we then have the presence of debug info intrinsics</div><div style>changing the generated code - normally a big no-no...</div>
<div style><br></div><div style>-eric </div></div><br></div></div>