This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC mini-summit - compiling for a particular architecture
> On Sun, 2007-04-22 at 14:44 +0200, Richard Guenther wrote:
> > On 4/22/07, Laurent GUERBY <laurent@guerby.net> wrote:
> > > > > but also does not make anyone actually use the options. Nobody reads
> > > > > the documention. Of course, this is a bit overstatement, but with a
> > > > > few exceptions, people in general do not enable non-default flags.
> > > >
> > > > I don't think this is fair.
> > > > Most people don't read the docs because they don't care about
> > > > performance, but most people who develop code that spends a lot of CPU
> > > > cycles actually read the docs at least up to loop unrolling.
> > >
> > > Exactly my experience.
> > >
> > > Unfortunately there's no useful information on this topic in the GCC
> > > manual...
> >
> > Well, we have too many switches really. So the default is use -O2. If you
> > want extra speed, try -O3, or even better use profile feedback. (Not many
> > people realize that with profile feedback you get faster code than with
> > -O3 and smaller code than with -Os - at least for C++ programs)
>
> At work we use -O3 since it gives 5% performance gain against -O2.
> profile-feedback has many flags and there is no overview of it in the
> doc IIRC. Who will use it except GCC developpers? Who knows about your
> advice?
Well, this is why -fprofile-generate and -fprofile-use was invented.
Perhaps docs can be improved so people actually discover it. Do you
have any suggestions?
(Perhaps a chapther for FDO or subchapter of gcov docs would do?)
Honza
>
> The GCC user documentation is the place...
>
> Laurent
>