From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1458 invoked by alias); 16 Sep 2002 17:39:20 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 1451 invoked from network); 16 Sep 2002 17:39:19 -0000 Received: from unknown (HELO desire.geoffk.org) (12.235.56.190) by sources.redhat.com with SMTP; 16 Sep 2002 17:39:19 -0000 Received: (from geoffk@localhost) by desire.geoffk.org (8.11.6/8.11.6) id g8GHdEv30073; Mon, 16 Sep 2002 10:39:14 -0700 X-Authentication-Warning: desire.geoffk.org: geoffk set sender to geoffk@geoffk.org using -f To: Jerome L Quinn CC: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] optimization docs part 2 References: From: Geoff Keating Date: Mon, 16 Sep 2002 10:39:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-09/txt/msg00953.txt.bz2 Jerome L Quinn writes: > Here's the flag listing for the -O flags. I scanned the sources to try to > get these lists right, but there may still be errors. Please let me know > and I'll fix up the lists to match reality. This patch also requires an assignment. > 2002-08-30 Jerry Quinn > * gcc/gcc/doc/invoke.texi (Optimization Options): List the options > enabled by each -O flag. Please make sure that the ChangeLog entry you finally commit is properly formatted: two spaces after the date and between the name and the e-mail address, one blank line after the header line, and one tab before every line of the body. > --- gcc/gcc/doc/invoke.texi.safe 2002-08-25 01:03:45.000000000 > -0400 > +++ gcc/gcc/doc/invoke.texi 2002-08-25 01:05:21.000000000 -0400 > @@ -3196,6 +3196,22 @@ > time, without performing any optimizations that take a great deal of > compilation time. > > +@option{-O} turns on the following optimizations: I would say "turns on the following optimization flags", instead, since this isn't a complete list of optimizations that are switched on by -O1, only those that have separate flags. > +@gccoptlist{-fdefer-pop > +-fmerge-constants > +-fthread-jumps > +-floop-optimize > +-fcrossjumping > +-fif-conversion > +-fif-conversion2 > +-fdelayed-branch > +-fguess-branch-probability > +-fcprop-registers} > + > +@option{-O} also turns on @option{-fomit-frame-pointer} on machines > +where doing so does not interfere with debugging. > + > + Why the two new blank lines here? > @item -O0 > @opindex O0 > -Do not optimize. > +Do not optimize. This is equivalent to not using any optimization flags. I think it would be clearer to write "This is the default.". -O0 is not the same as -O1 followed by -fno-defer-pop and so on. > @item -Os > @opindex Os > @@ -3229,6 +3258,11 @@ > do not typically increase code size. It also performs further > optimizations designed to reduce code size. > > +@option{-Os} disables the following optimization flags: > +@gccoptlist{-falign-functions -falign-jumps -falign-loops > +-falign-labels -fprefetch-loop-arrays} > + > + Should this also say something like "This enables the following optimisation flags" (plus a list of the flags)? Thank you for trying to do this, I find the existing structure (where flags are listed in order according to what -Ox flag enables them) confusing myself, and I know others also find it confusing because they keep putting new flags in the wrong place. -- - Geoffrey Keating