<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt">r168864.<br><br><div class="gmail_quote">On Thu, Nov 29, 2012 at 1:33 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.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="HOEnZb"><div class="h5">On Thu, Nov 29, 2012 at 1:26 AM, Kostya Serebryany <<a href="mailto:kcc@google.com">kcc@google.com</a>> wrote:<br>

><br>
><br>
> On Thu, Nov 29, 2012 at 1:23 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>><br>
> wrote:<br>
>><br>
>> On Thu, Nov 29, 2012 at 1:20 AM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>><br>
>> wrote:<br>
>> > You shouldn't see any performance degradation... Just create a null<br>
>> > pointer for the function in the pass. The first time you need it, if<br>
>> > null, getOrInsert. Afterwards, it isn't null. The null test shouldn't<br>
>> > matter at all.<br>
>><br>
>> It occurs to me that of course, this pointer could only be used for<br>
>> the duration of a single runOnFunction invocation. That might make it<br>
>> less appealing as an optimization.<br>
><br>
><br>
> Yea, a bit scary. Again, what if runOnFunction runs in parallel. This will<br>
> become one more race to fix.<br>
> Let me simply call getOrInsertFunction in runOnFunction...<br>
> Ok?<br>
<br>
</div></div>Yea, either that or the compiler.used variable seems cleanest.<br>
</blockquote></div><br></div>