[LLVMdev] [cfe-dev] Controlling the LTO optimization level
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.
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
> > -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
> build system, and so the cost of enabling a given pass is larger,
> at lower optimization levels. The passes I selected seemed to provide
> 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>
> > >
> > > + OptLevel = opt - '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
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev