<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 10:52 AM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">None of my performance concerns were relevant to this change FWIW.</div></blockquote><div><br>Good to know - if we wanted to go down this path I figure we could just provide overloads - StringRef and Twine, the StringRef one could always use the name, even in -Asserts and the Twine one would not.<br><br>But yeah, your comments below seem worth considering before we figure out about that path.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I think the reason that this got "fixed" was because people had a tendancy to *rely* on the name downstream when we made it always present. =/ Personally, I like having *no* names in a no-asserts build because it ensures that absolutely no one is relying on them -- we have debug information for that.<br></div><div><br></div><div>I wonder if the right way to help the debugging scenario (which is very real and painful) is to expose a flag for this, or to expose a way to take an IR file with debug info and synthesize nice names for as much as we can using the debug info?</div></div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Tue, Sep 8, 2015 at 10:47 AM David Blaikie via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_extra"><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><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></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><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><font color="#888888"><div><br></div><div>John.</div></font></span></div></blockquote></div><br></div></div></div></div><span class="">
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</span></blockquote></div>
</blockquote></div><br></div></div>