[cfe-dev] [LLVMdev] Controlling the LTO optimization level
Eric Christopher
echristo at gmail.com
Thu Mar 19 14:43:13 PDT 2015
Looks good I guess.
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.
-eric
On Thu, Mar 19, 2015 at 2:34 PM Peter Collingbourne <peter at pcc.me.uk> wrote:
> On Thu, Mar 19, 2015 at 01:43:25PM -0700, Duncan P. N. Exon Smith wrote:
> > This SGTM in principle. The specific set of passes that you've enabled
> at
> > -O1 seems strangely small to me, but we can adjust that later.
>
> Sure. (It seemed best to me for this set to be small, at least for now,
> because LTO is single-threaded, unlike regular optimization in a
> parallelized
> build system, and so the cost of enabling a given pass is larger,
> especially
> at lower optimization levels. The passes I selected seemed to provide
> enough
> benefit to justify the cost.)
>
> > Should this -O level be shared with CodeGen?
>
> Seems reasonable, done.
>
> > > On 2015-Mar-19, at 13:13, Rafael EspĂndola <rafael.espindola at gmail.com>
> wrote:
> > >
> > > + OptLevel = opt[1] - '0';
> > >
> > > Please check and reject things like -OX at least in the gold plugin.
> >
> > Same with the libLTO API and `llvm-lto`.
> >
> > It might be nice to write a single utility function to verify this that's
> > shared between the three consumers?
>
> Maybe. That might wait until the consumers share some kind of common flag
> parsing API though. At the moment they're different enough that it's
> simplest
> to just write out the check in each one.
>
> > >
> > > Can you add a test showing that
> > >
> > > * createLowerBitSetsPass is run at -O0
> > > * the addLateLTOOptimizationPasses passes are run at -O1, but not -O0
>
> Done.
>
> Thanks,
> --
> Peter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150319/61771311/attachment.html>
More information about the cfe-dev
mailing list