This patch fixes the problems with the docs for the defaults for some
-fno-xxxx options as noted in PR 41179. I double-checked the behavior
against the code in opts.c and didn't just base this on trying to
interpret the previous contorted wording. :-)
This also addresses part of PR 65703. My next patch will address the
other part of that issue, relating to not being able to find the
documentation for the positive form of options like -fno-defer-pop.
-Sandra
2018-11-09 Sandra Loosemore <san...@codesourcery.com>
PR driver/41179
PR middle-end/65703
gcc/
* doc/invoke.texi (Optimize Options): Clarify default behavior
for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi (revision 265990)
+++ doc/invoke.texi (working copy)
@@ -8062,12 +8062,11 @@ optimizations to be performed is desired
@table @gcctabopt
@item -fno-defer-pop
@opindex fno-defer-pop
-Always pop the arguments to each function call as soon as that function
-returns. For machines that must pop arguments after a function call,
-the compiler normally lets arguments accumulate on the stack for several
-function calls and pops them all at once.
-
-Disabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
+For machines that must pop arguments after a function call, always pop
+the arguments as soon as each function returns.
+At levels @option{-O1} and higher, @option{-fdefer-pop} is the default;
+this allows the compiler to let arguments accumulate on the stack for several
+function calls and pop them all at once.
@item -fforward-propagate
@opindex fforward-propagate
@@ -8284,18 +8283,16 @@ life-range analysis. This option is eff
@item -fno-branch-count-reg
@opindex fno-branch-count-reg
-Avoid running a pass scanning for opportunities to use ``decrement and
-branch'' instructions on a count register instead of generating sequences
-of instructions that decrement a register, compare it against zero, and
+Disable the optimization pass that scans for opportunities to use
+``decrement and branch'' instructions on a count register instead of
+instruction sequences that decrement a register, compare it against zero, and
then branch based upon the result. This option is only meaningful on
architectures that support such instructions, which include x86, PowerPC,
IA-64 and S/390. Note that the @option{-fno-branch-count-reg} option
doesn't remove the decrement and branch instructions from the generated
instruction stream introduced by other optimization passes.
-Enabled by default at @option{-O1} and higher.
-
-The default is @option{-fbranch-count-reg}.
+The default is @option{-fbranch-count-reg} at @option{-O1} and higher.
@item -fno-function-cse
@opindex fno-function-cse
@@ -9684,9 +9681,10 @@ are not removed. This option is intende
that relies on a particular ordering. For new code, it is better to
use attributes when possible.
-Enabled at level @option{-O0}. When disabled explicitly, it also implies
-@option{-fno-section-anchors}, which is otherwise enabled at @option{-O0} on some
-targets.
+@option{-ftoplevel-reorder} is the default at @option{-O1} and higher, and
+also at @option{-O0} if @option{-fsection-anchors} is explicitly requested.
+Additionally @option{-fno-toplevel-reorder} implies
+@option{-fno-section-anchors}.
@item -fweb
@opindex fweb