From: Kenneth Zadeck <zadeck@naturalbridge.com>
To: janis187@us.ibm.com
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
gerald@pfeifer.com, jsm@polyomino.org.uk
Subject: Re: undocumented optimization options
Date: Mon, 05 Nov 2007 20:04:00 -0000 [thread overview]
Message-ID: <472F77D3.7050108@naturalbridge.com> (raw)
In-Reply-To: <1193936896.7293.7.camel@janis-laptop>
[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]
Janis Johnson wrote:
> Several options reported by --help=optimize are not documented in the
> GCC Manual (via invoke.texi) but are still reported with
> --help=optimize,^undocumented. Here are the options along with the
> people who checked in the entries to common.opt:
>
> -fipa-cp steven
> -fipa-matrix-reorg razya
> -fipa-pure-const zadeck (enabled with -O)
> -fipa-reference zadeck (enabled with -O)
> -fipa-type-escape zadeck
> -fvar-tracking-uninit ctice
>
> Is there a policy about whether an experimental option can be left
> undocumented, or should it be documented with a statement that it is
> experimental?
>
> If an option is left undocumented on purpose then its entry in common.opt
> should include "Undocumented".
>
> Janis
>
>
>
This patch gets me off of janis's bad list (or at least the one
associated with undocumented options). As directed by diego, I sorted
the option lists for -O, -Os and -O2 since this had rotted.
2007-11-05 Kenneth Zadeck <zadeck@naturalbridge.com>
* common.opt: Add pointer to doc/options.texi.
* doc/invoke.texi (-fdse, -fdce, -fauto-inc-dec, -fipa-pure-const,
-fipa-reference): Add or correct doc. Sorted options list for -Os
-O, -O2.
Ok to commit?
Kenny
[-- Attachment #2: options1.diff --]
[-- Type: text/x-patch, Size: 10136 bytes --]
Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi (revision 129907)
+++ doc/invoke.texi (working copy)
@@ -315,57 +315,51 @@ Objective-C and Objective-C++ Dialects}.
@item Optimization Options
@xref{Optimize Options,,Options that Control Optimization}.
-@gccoptlist{-falign-functions[=@var{n}] -falign-jumps[=@var{n}] @gol
--falign-labels[=@var{n}] -falign-loops[=@var{n}] @gol
--fassociative-math -freciprocal-math @gol
--fmudflap -fmudflapth -fmudflapir @gol
--fbranch-probabilities -fprofile-values -fvpt @gol
--fbranch-target-load-optimize @gol
--fbranch-target-load-optimize2 -fbtr-bb-exclusive @gol
--fcaller-saves -fcprop-registers -fcse-follow-jumps @gol
--fcse-skip-blocks -fcx-limited-range -fdata-sections -fdce @gol
--fdelayed-branch -fdelete-null-pointer-checks -fdse -fearly-inlining @gol
--fexpensive-optimizations -ffast-math -ffloat-store @gol
--fforce-addr -fforward-propagate -ffunction-sections @gol
--fgcse -fgcse-lm -fgcse-sm -fgcse-las -fgcse-after-reload @gol
--fcrossjumping -fif-conversion -fif-conversion2 @gol
--finline-functions -finline-functions-called-once @gol
--finline-small-functions -finline-limit=@var{n} -fkeep-inline-functions @gol
--fkeep-static-consts -fmerge-constants -fmerge-all-constants @gol
--fmodulo-sched -fmodulo-sched-allow-regmoves -fno-branch-count-reg @gol
--fno-default-inline -fno-defer-pop -fmove-loop-invariants @gol
--fno-function-cse -fno-guess-branch-probability @gol
--fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol
--funsafe-math-optimizations -funsafe-loop-optimizations @gol
--ffinite-math-only -fno-signed-zeros @gol
--fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss @gol
--fomit-frame-pointer -foptimize-register-move @gol
--foptimize-sibling-calls -fpredictive-commoning -fprefetch-loop-arrays @gol
--fprofile-generate -fprofile-use @gol
--fregmove -frename-registers @gol
--freorder-blocks -freorder-blocks-and-partition -freorder-functions @gol
--frerun-cse-after-loop @gol
--frounding-math -frtl-abstract-sequences @gol
--fschedule-insns -fschedule-insns2 @gol
--fno-sched-interblock -fno-sched-spec -fsched-spec-load @gol
--fsched-spec-load-dangerous @gol
--fsched-stalled-insns[=@var{n}] -fsched-stalled-insns-dep[=@var{n}] @gol
--fsched2-use-superblocks @gol
--fsched2-use-traces -fsee -freschedule-modulo-scheduled-loops @gol
--fsection-anchors -fsignaling-nans -fsingle-precision-constant @gol
--fsplit-wide-types -fstack-protector -fstack-protector-all @gol
--fstrict-aliasing -fstrict-overflow -ftracer -fthread-jumps @gol
--funroll-all-loops -funroll-loops -fpeel-loops @gol
--fsplit-ivs-in-unroller -funswitch-loops @gol
--fvariable-expansion-in-unroller -ftree-reassoc @gol
--ftree-pre -ftree-ccp -ftree-dce -ftree-loop-optimize @gol
--ftree-loop-linear -ftree-loop-im -ftree-loop-ivcanon -fivopts @gol
--fcheck-data-deps -ftree-parallelize-loops=@var{n} @gol
--ftree-dominator-opts -ftree-dse -ftree-copyrename -ftree-sink @gol
--ftree-ch -ftree-sra -ftree-ter -ftree-fre -ftree-vectorize @gol
--ftree-vect-loop-version -fvect-cost-model -ftree-salias -fipa-pta -fweb @gol
--ftree-copy-prop -ftree-store-ccp -ftree-vrp @gol
--funit-at-a-time -fwhole-program @gol
+@gccoptlist{
+-falign-functions[=@var{n}] -falign-jumps[=@var{n}] @gol
+-falign-labels[=@var{n}] -falign-loops[=@var{n}] -fassociative-math @gol
+-fauto-inc-dec -fbranch-probabilities -fbranch-target-load-optimize @gol
+-fbranch-target-load-optimize2 -fbtr-bb-exclusive -fcaller-saves @gol
+-fcheck-data-deps -fcprop-registers -fcrossjumping -fcse-follow-jumps @gol
+-fcse-skip-blocks -fcx-limited-range -fdata-sections -fdce -fdce @gol
+-fdelayed-branch -fdelete-null-pointer-checks -fdse -fdse @gol
+-fearly-inlining -fexpensive-optimizations -ffast-math @gol
+-ffinite-math-only -ffloat-store -fforce-addr -fforward-propagate @gol
+-ffunction-sections -fgcse -fgcse-after-reload -fgcse-las -fgcse-lm @gol
+-fgcse-sm -fif-conversion -fif-conversion2 -finline-functions @gol
+-finline-functions-called-once -finline-limit=@var{n} @gol
+-finline-small-functions -fipa-pta -fipa-pure-const -fipa-reference @gol
+-fipa-type-escape -fivopts -fkeep-inline-functions -fkeep-static-consts @gol
+-fmerge-all-constants -fmerge-constants -fmodulo-sched @gol
+-fmodulo-sched-allow-regmoves -fmove-loop-invariants -fmudflap @gol
+-fmudflapir -fmudflapth -fno-branch-count-reg -fno-default-inline @gol
+-fno-defer-pop -fno-function-cse -fno-guess-branch-probability @gol
+-fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol
+-fno-sched-interblock -fno-sched-spec -fno-signed-zeros @gol
+-fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss @gol
+-fomit-frame-pointer -foptimize-register-move -foptimize-sibling-calls @gol
+-fpeel-loops -fpredictive-commoning -fprefetch-loop-arrays @gol
+-fprofile-generate -fprofile-use -fprofile-values -freciprocal-math @gol
+-fregmove -frename-registers -freorder-blocks @gol
+-freorder-blocks-and-partition -freorder-functions @gol
+-frerun-cse-after-loop -freschedule-modulo-scheduled-loops @gol
+-frounding-math -frtl-abstract-sequences -fsched2-use-superblocks @gol
+-fsched2-use-traces -fsched-spec-load -fsched-spec-load-dangerous @gol
+-fsched-stalled-insns-dep[=@var{n}] -fsched-stalled-insns[=@var{n}] @gol
+-fschedule-insns -fschedule-insns2 -fsection-anchors -fsee @gol
+-fsignaling-nans -fsingle-precision-constant -fsplit-ivs-in-unroller @gol
+-fsplit-wide-types -fstack-protector -fstack-protector-all @gol
+-fstrict-aliasing -fstrict-overflow -fthread-jumps -ftracer -ftree-ccp @gol
+-ftree-ch -ftree-copy-prop -ftree-copyrename -ftree-dce @gol
+-ftree-dominator-opts -ftree-dse -ftree-fre -ftree-loop-im @gol
+-ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol
+-ftree-parallelize-loops=@var{n} -ftree-pre -ftree-reassoc -ftree-salias @gol
+-ftree-sink -ftree-sra -ftree-store-ccp -ftree-ter @gol
+-ftree-vect-loop-version -ftree-vectorize -ftree-vrp -funit-at-a-time @gol
+-funroll-all-loops -funroll-loops -funsafe-loop-optimizations @gol
+-funsafe-math-optimizations -funswitch-loops @gol
+-fvariable-expansion-in-unroller -fvect-cost-model -fvpt -fweb @gol
+-fwhole-program @gol
--param @var{name}=@var{value}
-O -O0 -O1 -O2 -O3 -Os}
@@ -5027,27 +5021,31 @@ time, without performing any optimizatio
compilation time.
@option{-O} turns on the following optimization flags:
-@gccoptlist{-fdefer-pop @gol
--fdelayed-branch @gol
--fguess-branch-probability @gol
+@gccoptlist{
+-fauto-inc-dec @gol
-fcprop-registers @gol
-fdce @gol
+-fdefer-pop @gol
+-fdelayed-branch @gol
-fdse @gol
--fif-conversion @gol
+-fguess-branch-probability @gol
-fif-conversion2 @gol
+-fif-conversion @gol
+-finline-small-functions @gol
+-fipa-pure-const @gol
+-fipa-reference @gol
+-fmerge-constants
-fsplit-wide-types @gol
-ftree-ccp @gol
+-ftree-ch @gol
+-ftree-copyrename @gol
-ftree-dce @gol
-ftree-dominator-opts @gol
-ftree-dse @gol
--ftree-ter @gol
--ftree-sra @gol
--ftree-copyrename @gol
-ftree-fre @gol
--ftree-ch @gol
--funit-at-a-time @gol
--finline-small-functions @gol
--fmerge-constants}
+-ftree-sra @gol
+-ftree-ter @gol
+-funit-at-a-time}
@option{-O} also turns on @option{-fomit-frame-pointer} on machines
where doing so does not interfere with debugging.
@@ -5063,24 +5061,24 @@ and the performance of the generated cod
@option{-O2} turns on all optimization flags specified by @option{-O}. It
also turns on the following optimization flags:
@gccoptlist{-fthread-jumps @gol
+-falign-functions -falign-jumps @gol
+-falign-loops -falign-labels @gol
+-fcaller-saves @gol
-fcrossjumping @gol
--foptimize-sibling-calls @gol
-fcse-follow-jumps -fcse-skip-blocks @gol
--fgcse -fgcse-lm @gol
+-fdelete-null-pointer-checks @gol
-fexpensive-optimizations @gol
--frerun-cse-after-loop @gol
--fcaller-saves @gol
+-fgcse -fgcse-lm @gol
+-foptimize-sibling-calls @gol
-fpeephole2 @gol
--fschedule-insns -fschedule-insns2 @gol
--fsched-interblock -fsched-spec @gol
-fregmove @gol
--fstrict-aliasing -fstrict-overflow @gol
--fdelete-null-pointer-checks @gol
-freorder-blocks -freorder-functions @gol
--falign-functions -falign-jumps @gol
--falign-loops -falign-labels @gol
--ftree-vrp @gol
--ftree-pre}
+-frerun-cse-after-loop @gol
+-fsched-interblock -fsched-spec @gol
+-fschedule-insns -fschedule-insns2 @gol
+-fstrict-aliasing -fstrict-overflow @gol
+-ftree-pre @gol
+-ftree-vrp}
Please note the warning under @option{-fgcse} about
invoking @option{-O2} on programs that use computed gotos.
@@ -5485,6 +5483,13 @@ resulting code may or may not perform be
Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
+@item -fauto-inc-dec
+@opindex fauto-inc-dec
+Combine increments or decrements of addresses with memory accesses.
+This pass is always skipped on architectures that do not have
+instructions to support this. Enabled by default at @option{-O} and
+higher on architectures that support this.
+
@item -fdce
@opindex fdce
Perform dead code elimination (DCE) on RTL.
@@ -5694,6 +5699,17 @@ higher.
Perform structural alias analysis on trees. This flag
is enabled by default at @option{-O} and higher.
+@item -fipa-pure-const
+@opindex fipa-pure-const
+Discover which functions are pure or constant.
+Enabled by default at @option{-O} and higher.
+
+@item -fipa-reference
+@opindex fipa-reference
+Discover which static variables do not escape cannot escape the
+compilation unit.
+Enabled by default at @option{-O} and higher.
+
@item -fipa-pta
@opindex fipa-pta
Perform interprocedural pointer analysis.
Index: common.opt
===================================================================
--- common.opt (revision 129907)
+++ common.opt (working copy)
@@ -18,7 +18,7 @@
; along with GCC; see the file COPYING3. If not see
; <http://www.gnu.org/licenses/>.
-; See the GCC internals manual for a description of this file's format.
+; See the GCC internals manual (options.texi) for a description of this file's format.
; Please try to keep this file in ASCII collating order.
next parent reply other threads:[~2007-11-05 20:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1193936896.7293.7.camel@janis-laptop>
2007-11-05 20:04 ` Kenneth Zadeck [this message]
2007-11-08 9:07 ` Richard Guenther
2007-11-08 13:48 ` Kenneth Zadeck
[not found] <4731FAA9.1050100@naturalbridge.com>
2007-11-12 10:17 ` Razya Ladelsky
2007-11-12 13:22 ` Richard Guenther
2007-11-12 15:28 ` Razya Ladelsky
2007-11-12 15:38 ` Richard Guenther
2007-11-12 17:08 ` Mark Mitchell
2007-11-20 13:47 ` Razya Ladelsky
2007-11-20 13:49 ` Manfred Hollstein
2007-11-20 14:51 ` Richard Guenther
2007-11-13 20:11 ` Ian Lance Taylor
2007-11-15 16:42 ` Razya Ladelsky
2007-11-15 19:43 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=472F77D3.7050108@naturalbridge.com \
--to=zadeck@naturalbridge.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gerald@pfeifer.com \
--cc=janis187@us.ibm.com \
--cc=jsm@polyomino.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).