[llvm] r232769 - libLTO, llvm-lto, gold: Introduce flag for controlling optimization level.
Peter Collingbourne
peter at pcc.me.uk
Mon Mar 23 15:00:01 PDT 2015
On Mon, Mar 23, 2015 at 02:52:41PM -0700, Ahmed Bougacha wrote:
> On Thu, Mar 19, 2015 at 3:01 PM, Peter Collingbourne <peter at pcc.me.uk> wrote:
> > +static cl::opt<char>
> > +OptLevel("O",
> > + cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] "
> > + "(default = '-O2')"),
>
> This means LTO now defaults to -O2 - rather than the previous -O3 -
> for CodeGenOpt, right? That seems like a somewhat important change,
> affecting all LTO users.
>
> Don't get me wrong, I think it's for the best, but people involved
> with performance might be interested in this.
I believe the default before was -O2, because OptLevel is initialized
to 2 by the PassManagerBuilder constructor, and none of the previous LTO
infrastructure changed it.
Anyway, there is no difference between -O2 and -O3 for LTO, as far as I
can tell.
Thanks,
--
Peter
More information about the llvm-commits
mailing list