This is the mail archive of the
mailing list for the GCC project.
Re: -O2 versus -O1 (Was: Re: GCSE store motion)
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jan Hubicka <jh at suse dot cz>, Robert Dewar <dewar at gnat dot com>
- Cc: "dberlin at dberlin dot org" <dberlin at dberlin dot org>, "roger at eyesopen dot com" <roger at eyesopen dot com>, "aj at suse dot de" <aj at suse dot de>, "davem at redhat dot com" <davem at redhat dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, "rth at redhat dot com" <rth at redhat dot com>
- Date: Thu, 16 May 2002 07:46:15 -0700
- Subject: Re: -O2 versus -O1 (Was: Re: GCSE store motion)
- References: <20020516114838.949B6F28C9@nile.gnat.com><20020516140707.GH21167@atrey.karlin.mff.cuni.cz>
I'm not sure how to change around what's in -O2 and -O1. We don't want
to confuse people who are used to one set of things, of course. It's
a tricky question.
> Another thing I believe can be worthwhile is to have switch that enables
> the aggressive bits, like loop unrolling or prefetch people can use for
> benchmarks or very CPU bound code. It appears to be common problems of
> the GCC reviews that they do use suboptimal switches and partly it is our
> mistake I guess. It is very dificult to set it up.
See my earlier rants about why it is bad to have so dang many options...
I'm not sure what to do, exactly, but you're right that it would be nice
if you tended to get the fastest code with "-O2" or "-O3" and not
"-O2 -fno-this -fthat". If that's not turning out to be true, we should
see if we could tune it somewhat.
Mark Mitchell firstname.lastname@example.org
CodeSourcery, LLC http://www.codesourcery.com