<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><br><br><div class="gmail_quote">On Thu, Nov 29, 2012 at 1:23 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="im">On Thu, Nov 29, 2012 at 1:20 AM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> 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>
</div>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></blockquote><div><br></div><div>Yea, a bit scary. Again, what if runOnFunction runs in parallel. This will become one more race to fix. </div>Let me simply call getOrInsertFunction in runOnFunction... </div>
<div class="gmail_quote">Ok? </div><br></div>