<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 5, 2015 at 1:31 AM, Erik Eckstein <span dir="ltr"><<a href="mailto:eeckstein@apple.com" target="_blank">eeckstein@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"> As far as I'm aware, the only way this happens is if you continually destroy and re-create your passmanager</div></div></blockquote><br></div></span><div>FPPassManager::runOnFunction also (indirectly) calls PassRegistry::getPassInfo. I think this is the reason for the 5% (what I'm seeing).</div><div><br></div><div>But anyway, if you strongly disagree with this patch I can revert it. Both problems I mentioned are not big problems.</div></blockquote></div><br>Yea, I'm strongly opposed to using modal synchronization. It is far too easy to get wrong and hard to debug when it is wrong.</div><div class="gmail_extra"><br></div><div class="gmail_extra">If there is a problem here, we should fix it directly. I'm surprised there are any uncached calls left to getPassInfo from runOnFunction. Those could probably also be cached much like I cached the ones in the analysis call paths. That would address the 5% slowdown.</div></div>