This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] clarify documentation of -Q --help=optimizers
- From: Martin Sebor <msebor at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: Alexander Monakov <amonakov at ispras dot ru>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 05 Nov 2015 10:46:54 -0700
- Subject: Re: [PATCH] clarify documentation of -Q --help=optimizers
- Authentication-results: sourceware.org; auth=none
- References: <56299713 dot 6040204 at gmail dot com> <562997A9 dot 3090203 at gmail dot com> <alpine dot LNX dot 2 dot 20 dot 1511031309390 dot 3529 at monopod dot intra dot ispras dot ru> <563A9A31 dot 5060306 at gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1511050053500 dot 18787 at digraph dot polyomino dot org dot uk> <alpine dot LNX dot 2 dot 20 dot 1511051343310 dot 10819 at monopod dot intra dot ispras dot ru> <563B7CA1 dot 6080801 at gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1511051707030 dot 26133 at digraph dot polyomino dot org dot uk>
On 11/05/2015 10:10 AM, Joseph Myers wrote:
On Thu, 5 Nov 2015, Martin Sebor wrote:
optimiziation. We seem to have consensus that even though there
might be exceptions (do we know what some of them are?) the vast
majority optimizations that have -fxxx options are in fact not
performed at -O0. I think reflecting that in the output is more
helpful than implying otherwise.
There are several options marked Optimization that are actually matters of
language semantics that I don't think have anything to do with -O options,
e.g. -fexceptions and -fcx-limited-range. The Optimization tag really
just means that it's saved and restored under certain circumstances.
Both -fexceptions and -fcx-limited-range are reported as disabled
at -O0, so they're not the examples I'm looking for. The set of
options that are reported as disabled by -O0 with the patched GCC
and that, IIUC, are of concern (i.e., that may not need -O to take
effect) are a subset of those below.
Quickly scanning the list, I would guess -frtti, -fshort-enums,
-fsigned-zeros, and -frtapping-math should be in that category,
but there could very well be others.
If it's relatively straightforward to enumerate all such options
then maybe the way to go is to add a bit to struct cl_option to
make it possible to distinguish them from the others in the -O0
-Q --help=optimizers output.
Thanks
Martin
-faggressive-loop-optimizations [disabled by -O0]
-fasynchronous-unwind-tables [disabled by -O0]
-fauto-inc-dec [disabled by -O0]
-fdce [disabled by -O0]
-fdelete-null-pointer-checks [disabled by -O0]
-fdse [disabled by -O0]
-fearly-inlining [disabled by -O0]
-ffunction-cse [disabled by -O0]
-fgcse-lm [disabled by -O0]
-finline [disabled by -O0]
-finline-atomics [disabled by -O0]
-fira-hoist-pressure [disabled by -O0]
-fira-share-save-slots [disabled by -O0]
-fira-share-spill-slots [disabled by -O0]
-fivopts [disabled by -O0]
-fjump-tables [disabled by -O0]
-flifetime-dse [disabled by -O0]
-fmath-errno [disabled by -O0]
-fpeephole [disabled by -O0]
-fplt [disabled by -O0]
-fprefetch-loop-arrays [disabled by -O0]
-frename-registers [disabled by -O0]
-frtti [disabled by -O0]
-fsched-critical-path-heuristic [disabled by -O0]
-fsched-dep-count-heuristic [disabled by -O0]
-fsched-group-heuristic [disabled by -O0]
-fsched-interblock [disabled by -O0]
-fsched-last-insn-heuristic [disabled by -O0]
-fsched-rank-heuristic [disabled by -O0]
-fsched-spec [disabled by -O0]
-fsched-spec-insn-heuristic [disabled by -O0]
-fsched-stalled-insns-dep [disabled by -O0]
-fschedule-fusion [disabled by -O0]
-fshort-enums [disabled by -O0]
-fsigned-zeros [disabled by -O0]
-fsplit-ivs-in-unroller [disabled by -O0]
-fssa-backprop [disabled by -O0]
-fstdarg-opt [disabled by -O0]
-fstrict-volatile-bitfields [disabled by -O0]
-fno-threadsafe-statics [disabled by -O0]
-ftrapping-math [disabled by -O0]
-ftree-cselim [disabled by -O0]
-ftree-forwprop [disabled by -O0]
-ftree-loop-if-convert [disabled by -O0]
-ftree-loop-im [disabled by -O0]
-ftree-loop-ivcanon [disabled by -O0]
-ftree-loop-optimize [disabled by -O0]
-ftree-phiprop [disabled by -O0]
-ftree-reassoc [disabled by -O0]
-ftree-scev-cprop [disabled by -O0]
-fvar-tracking [disabled by -O0]
-fvar-tracking-assignments [disabled by -O0]
-fweb [disabled by -O0]