<div dir="ltr">Ow. Anyways, I'd rather have a predicated and unpredicted form of cfgcleanup rather than litter predicates in the machine function pass layer itself.<br></div><br><div class="gmail_quote">On Wed, Apr 8, 2015 at 8:07 PM Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"><br>
It's a real case, check out the ARM port for it. </p>
<p dir="ltr"></p>
<p dir="ltr">On Wed, Apr 8, 2015, 8:02 PM Chandler Carruth <<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>> wrote:</p>
<blockquote><p dir="ltr">Is this a real use case or a hypothetical one? Because it seems somewhat contrived to me...</p>
<p dir="ltr">If there really is some predicate that necessitates really radically different pass pipelines, I feel like they should be, well, two separate pass pipelines.<br>
</p>
</blockquote>
<p dir="ltr"><br></p>
<blockquote><p dir="ltr"></p>
<p dir="ltr">On Wed, Apr 8, 2015 at 7:54 PM Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:</p>
</blockquote>
<blockquote><blockquote><p dir="ltr">Optnone, IMO, needs to be replaced by something less terrible. </p>
<p dir="ltr">I'm not sure how this is going to work with the "I want to run the first cfgcleanup unconditionally, but not the second" without tying the subtargets to things like shouldRunCfgCleanup2().<br></p>
<p dir="ltr">On Wed, Apr 8, 2015, 7:38 PM Sean Silva <<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>> wrote:</p>
</blockquote>
</blockquote>
<blockquote><blockquote><blockquote><p dir="ltr">Adding Paul as this seems related to optnone.<br></p>
<p dir="ltr">On Wed, Apr 8, 2015 at 7:31 PM, Chandler Carruth <<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>> wrote:</p>
</blockquote>
</blockquote>
</blockquote>
<blockquote><blockquote><blockquote><blockquote><p dir="ltr">I feel like we could do something much simpler than this. This feeling is predicated on one primary theory: most passes will run for most subtargets. Put another way, there will only be a small number of passes that we actually want to opt out of on a per-subtarget basis.</p>
<p dir="ltr">If we think that's likely to be the case, here is an alternative suggestion:</p>
<p dir="ltr">- Add bool-returning predicates for each pass to the subtarget base class (eg, "isIfConversionProfitable()") with the expected default ("true").<br>
- Override these for the subtargets that want to opt out.<br>
- Change the pass to directly get the subtarget, query it, and bail without doing anything if it gets "false".</p>
<p dir="ltr">From looking at and thinking about if-conversion at least, this seems nicer to me. It makes someone working on the pass aware that there are subtarget profitability concerns, and it makes it very clear that we are *running* all of the passes, just that some have no effect on certain subtargets.</p>
<p dir="ltr">This also matches how an optimization pass should query the function for the 'noopt' attribute and bail.</p>
<p dir="ltr">Thoughts?<br>
</p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<blockquote><blockquote><blockquote><p dir="ltr"><br>
</p>
</blockquote>
</blockquote>
</blockquote>
<blockquote><blockquote><blockquote><blockquote><p dir="ltr"></p>
<p dir="ltr"><a href="http://reviews.llvm.org/D8717" target="_blank">http://reviews.llvm.org/D8717</a></p>
<p dir="ltr">EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br></p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<blockquote><blockquote><blockquote><p dir="ltr"><br>
</p>
</blockquote>
</blockquote>
</blockquote>
<blockquote><blockquote><blockquote><blockquote><p dir="ltr">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<blockquote><blockquote><p dir="ltr"><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</p>
</blockquote>
</blockquote>
<p dir="ltr"><br>
</p>
</blockquote></div>