[PATCH] D30920: Do not pass -Os and -Oz to the Gold plugin

Hal Finkel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 16 13:39:15 PDT 2017

hfinkel added a comment.

In https://reviews.llvm.org/D30920#703083, @mehdi_amini wrote:

> In https://reviews.llvm.org/D30920#703082, @hfinkel wrote:
> > In https://reviews.llvm.org/D30920#700741, @mehdi_amini wrote:
> >
> > > Yes, the issue is only about how the driver accepts Os for the link even though it has no effect (O0/https://reviews.llvm.org/owners/package/1//https://reviews.llvm.org/owners/package/2//https://reviews.llvm.org/owners/package/3/ *will* have an effect though).
> >
> >
> > Do we agree that the desired endpoint here is that all optimization flags are encoded in the IR somehow? If so, in this desired end state, will it will be true that -O[n] will have some affect on an LTO link step?
> I don't think we have any plan for the optimization *level* (1, 2, and 3), at least not that I know of. I don't even see how it would be possible to achieve it in a principled way without limiting what we're allowing ourself to express at the PassManager level with these levels.

Please elaborate.

> We can handle O0 (optnone), Os (optsize), and Oz (minsize) separately though, because we can make these independent of the passmanager setup.

I'm trying to figure out if these are really fundamentally different from 1,2,3 or if we just happen to handle them differently right now.


More information about the cfe-commits mailing list