On Sun, 15 Jul 2012, William J. Schmidt wrote: > The auto-vectorizer is overly aggressive when not constrained by the > vectorizer cost model. Although the cost model is by no means perfect, > it does a reasonable job of avoiding many poor vectorization decisions. > Since the auto-vectorizer is enabled by default at -O3 and above, we > should also enable the vectorizer cost model by default at -O3 and > above. > > Bootstrapped and tested on powerpc64-unknown-linux-gnu with no new > regressions. Ok for trunk?
I agree this makes sense. It probably will cause some missed-optimization bugreports which means we need to make more target cost implementation adjustments. Thus, ok. Thanks, Richard. > Thanks, > Bill > > > 2012-07-15 Bill Schmidt <wschm...@linux.ibm.com> > > * opts.c (default_option): Add -fvect-cost-model to default options > at -O3 and above. > > > Index: gcc/opts.c > =================================================================== > --- gcc/opts.c (revision 189481) > +++ gcc/opts.c (working copy) > @@ -501,6 +501,7 @@ static const struct default_options default_option > { OPT_LEVELS_3_PLUS, OPT_funswitch_loops, NULL, 1 }, > { OPT_LEVELS_3_PLUS, OPT_fgcse_after_reload, NULL, 1 }, > { OPT_LEVELS_3_PLUS, OPT_ftree_vectorize, NULL, 1 }, > + { OPT_LEVELS_3_PLUS, OPT_fvect_cost_model, NULL, 1 }, > { OPT_LEVELS_3_PLUS, OPT_fipa_cp_clone, NULL, 1 }, > { OPT_LEVELS_3_PLUS, OPT_ftree_partial_pre, NULL, 1 }, > > > > -- Richard Guenther <rguent...@suse.de> SUSE / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 GF: Jeff Hawn, Jennifer Guild, Felix Imend