This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] New optimize(0) versioning fix (PR target/60026, take 2)


On Fri, 7 Feb 2014, Jan Hubicka wrote:

> > On Fri, Feb 07, 2014 at 12:50:22AM +0100, Jan Hubicka wrote:
> > > Don't we want to check opt_for_fn (node->decl, cp) instead and arrange -fipa-cp
> > > to be false when !optimize?
> > 
> > I can easily imagine using
> >   !opt_for_fn (node->decl, optimize)
> >   || !opt_for_fn (node->decl, flag_ipa_cp)
> > but guaranteeing flag_ipa_cp or flag_ipa_sra is never true for optimize == 0
> > could be harder, what if something is built with -O0 -fipa-cp or
> > __attribute__((optimize (0), "fipa-cp"))) or similar?  Checking optimize
> > value is among other things about the lack of vdef/vuse for !optimize.
> 
> I always tought it would be better to inform users that -O0 -fipa-cp is
> broken combination of flags (but it seems our policy to not do that)
> or just clear -fipa-cp while processing argument as we do for some
> other contradicting combinations.

Well, we have the very same issue for other optimization passes
and -O0 (and now also -Og).  The idea that you can _enable_
random passes is simply not true.

But yes, diagnosing that a switch is ignored would be nice ...

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]