<div dir="ltr">Looks good I guess.<div><br></div><div>The comment over the lower bitsets patch should probably reference why it's "required" and what it's for etc. This kind of pass addition is honestly one of the reasons why I was wanting command line options. It doesn't affect too much by adding it and then removing it, but unlike some of the target passes that are subtarget dependent the bitset pass is only useful if you happened to build with the cfi stuff on.<br></div><div><br></div><div>-eric</div></div><br><div class="gmail_quote">On Thu, Mar 19, 2015 at 2:34 PM Peter Collingbourne <<a href="mailto:peter@pcc.me.uk">peter@pcc.me.uk</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Mar 19, 2015 at 01:43:25PM -0700, Duncan P. N. Exon Smith wrote:<br>
> This SGTM in principle. The specific set of passes that you've enabled at<br>
> -O1 seems strangely small to me, but we can adjust that later.<br>
<br>
Sure. (It seemed best to me for this set to be small, at least for now,<br>
because LTO is single-threaded, unlike regular optimization in a parallelized<br>
build system, and so the cost of enabling a given pass is larger, especially<br>
at lower optimization levels. The passes I selected seemed to provide enough<br>
benefit to justify the cost.)<br>
<br>
> Should this -O level be shared with CodeGen?<br>
<br>
Seems reasonable, done.<br>
<br>
> > On 2015-Mar-19, at 13:13, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>> wrote:<br>
> ><br>
> > + OptLevel = opt[1] - '0';<br>
> ><br>
> > Please check and reject things like -OX at least in the gold plugin.<br>
><br>
> Same with the libLTO API and `llvm-lto`.<br>
><br>
> It might be nice to write a single utility function to verify this that's<br>
> shared between the three consumers?<br>
<br>
Maybe. That might wait until the consumers share some kind of common flag<br>
parsing API though. At the moment they're different enough that it's simplest<br>
to just write out the check in each one.<br>
<br>
> ><br>
> > Can you add a test showing that<br>
> ><br>
> > * createLowerBitSetsPass is run at -O0<br>
> > * the addLateLTOOptimizationPasses passes are run at -O1, but not -O0<br>
<br>
Done.<br>
<br>
Thanks,<br>
--<br>
Peter<br>
</blockquote></div>