<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 10:26 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 style="word-wrap:break-word"><div><span class=""><blockquote type="cite"><div>On Sep 8, 2015, at 8:25 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:</div><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 8, 2015 at 2:18 AM, John McCall via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rjmccall<br>
Date: Tue Sep  8 04:18:30 2015<br>
New Revision: 246991<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=246991&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=246991&view=rev</a><br>
Log:<br>
When building the alloca for a local variable, set its name<br>
separately from building the instruction so that it's<br>
preserved even in -Asserts builds.<br></blockquote><div><br>Why do we want to preserve this name in particular in -Asserts builds?<br></div></div></div></div></div></blockquote><div><br></div></span>It’s a fairly small runtime cost — no twine appending, only present on a tiny fraction of instructions, unlikely to collide within a single function — that makes reading the IR dramatically easier.  That’s still useful to be able to do with a production compiler, both for us and for sophisticated users.</div><div><br></div><div>IIRC, Daniel did the perf work on IR names way back when; he might have other thoughts.</div></div></blockquote><div><br>*nod* I'd be curious to see/hear/better understand the tradeoffs. I know I've talked to Chandler (CC'd) about it before when he's expressed a desire to want to more fully remove names from non-asserts builds (specifically: optimizations still create named values even in -Asserts builds, I think? or maybe there was some other - oh, right, as you were saying, the Twine building cost, even when the name isn't used some names are complex to create, etc)<br> </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"><span class="HOEnZb"><font color="#888888"><div><br></div><div>John.</div></font></span></div></blockquote></div><br></div></div>