<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 13, 2013 at 4:09 PM, Robinson, Paul <span dir="ltr"><<a href="mailto:Paul_Robinson@playstation.sony.com" target="_blank" class="cremed">Paul_Robinson@playstation.sony.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":2tp" style="overflow:hidden">Patch #2 deals with skipping optimization passes for 'optnone'<br>
functions.  This is probably the piece that has caused the most angst.<br>
We tried to minimize the fiddling with the dreaded Pass Manager, and<br>
made as straightforward and simple a change as we could come up with<br>
that got the job done.  That is:<br>
<br>
We introduce a 'bool mustAlwaysRun()' method on passes, and say that<br>
an 'optnone' function doesn't run any function IR, loop, or basic<br>
block pass, unless that pass is marked 'mustAlwaysRun.'  The default<br>
for 'mustAlwaysRun' is true, so we explicitly turn it off for all the<br>
Transform passes that we do not want to run on an 'optnone' function.<br>
This is kind of tedious but is a mostly mechanical change.<br>
<br>
Note that module-level passes will still consider 'optnone' functions.</div></blockquote></div><br>I don't really like this approach.</div><div class="gmail_extra"><br></div><div class="gmail_extra">In re-working the pass manager stuff it is really desirable that the pass interface narrow. And if you're going to have to update each transform pass to handle this attribute anyways, it would seem better to just go into each pass's run method and add an early exit if the attribute is set. Did folks see any problems with doing that?</div>
</div>