This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] New optimize(0) versioning fix (PR target/60026, take 2)
- From: Richard Biener <rguenther at suse dot de>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Uros Bizjak <ubizjak at gmail dot com>, Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Feb 2014 09:49:18 +0100 (CET)
- Subject: Re: [PATCH] New optimize(0) versioning fix (PR target/60026, take 2)
- Authentication-results: sourceware.org; auth=none
- References: <20140205123722 dot GB12671 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1402051418260 dot 29326 at zhemvz dot fhfr dot qr> <20140205194227 dot GG12671 at tucnak dot redhat dot com> <20140206070928 dot GM12671 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1402061045150 dot 29326 at zhemvz dot fhfr dot qr> <20140206215906 dot GE12671 at tucnak dot redhat dot com> <20140206235022 dot GA1545 at kam dot mff dot cuni dot cz> <20140207082436 dot GA2360 at laptop dot fi dot muni dot cz> <20140207155435 dot GB16291 at kam dot mff dot cuni dot cz>
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.