aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-07-20 16:57:17 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2008-07-20 14:57:17 +0000
commitd6cc6ec9d11523de305be40a6e0e36ea9996de57 (patch)
treeaa3df5a11b81daa4bf2935f747dd343908e7a3c6 /gcc/doc
parentc0b215ccf649d4cd8f8dd4942ff6e57fb4584bb7 (diff)
downloadgcc-d6cc6ec9d11523de305be40a6e0e36ea9996de57.zip
gcc-d6cc6ec9d11523de305be40a6e0e36ea9996de57.tar.gz
gcc-d6cc6ec9d11523de305be40a6e0e36ea9996de57.tar.bz2
extend.texi (flatten attribute): Remove note about unit-at-a-time
* doc/extend.texi (flatten attribute): Remove note about unit-at-a-time * doc/invoke.texi (--combine): Likewise. (-finline-functions-called-once): Update levels when enabled. (-funit-at-a-time): Document new behaviour. (-ftoplevel-reorder): Document that it is enabled -O0 and imply -fno-section-anchors when disabled explicitly. (inline params): They are not ignored now. (precompiled headers): Remove unit-at-a-time as being incompatible. * opts.c (decode_options): Handle unit-at-a-time as alias; imply -fno-section-anchors when toplevel reorder is disabled explicitly. * common.opt (ftoplevel-reorder): Set default value to 2. (funit-at-a-time): Set default value to 1. * config/rs6000/rs6000.c (optimization_options): Set section anchors to 2. From-SVN: r138009
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/extend.texi3
-rw-r--r--gcc/doc/invoke.texi59
2 files changed, 15 insertions, 47 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 4a4c9a3..751e674 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -1945,8 +1945,7 @@ body.
Generally, inlining into a function is limited. For a function marked with
this attribute, every call inside this function will be inlined, if possible.
Whether the function itself is considered for inlining depends on its size and
-the current inlining parameters. The @code{flatten} attribute only works
-reliably in unit-at-a-time mode.
+the current inlining parameters.
@item error ("@var{message}")
@cindex @code{error} function attribute
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 6122f79..5114f70 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -5129,14 +5129,10 @@ Turning on optimization flags makes the compiler attempt to improve
the performance and/or code size at the expense of compilation time
and possibly the ability to debug the program.
-The compiler performs optimization based on the knowledge it has of
-the program. Optimization levels @option{-O} and above, in
-particular, enable @emph{unit-at-a-time} mode, which allows the
-compiler to consider information gained from later functions in
-the file when compiling a function. Compiling multiple files at
-once to a single output file in @emph{unit-at-a-time} mode allows
-the compiler to use information gained from all of the files when
-compiling each of them.
+The compiler performs optimization based on the knowledge it has of the
+program. Compiling multiple files at once to a single output file mode allows
+the compiler to use information gained from all of the files when compiling
+each of them.
Not all optimizations are controlled directly by a flag. Only
optimizations that have a flag are listed.
@@ -5342,7 +5338,7 @@ caller even if they are not marked @code{inline}. If a call to a given
function is integrated, then the function is not output as assembler code
in its own right.
-Enabled if @option{-funit-at-a-time} is enabled.
+Enabled at levels @option{-O1}, @option{-O2}, @option{-O3} and @option{-Os}.
@item -fearly-inlining
@opindex fearly-inlining
@@ -6316,39 +6312,11 @@ Enabled at levels @option{-O2}, @option{-O3}.
@item -funit-at-a-time
@opindex funit-at-a-time
-Parse the whole compilation unit before starting to produce code.
-This allows some extra optimizations to take place but consumes
-more memory (in general). There are some compatibility issues
-with @emph{unit-at-a-time} mode:
-@itemize @bullet
-@item
-enabling @emph{unit-at-a-time} mode may change the order
-in which functions, variables, and top-level @code{asm} statements
-are emitted, and will likely break code relying on some particular
-ordering. The majority of such top-level @code{asm} statements,
-though, can be replaced by @code{section} attributes. The
-@option{fno-toplevel-reorder} option may be used to keep the ordering
-used in the input file, at the cost of some optimizations.
-
-@item
-@emph{unit-at-a-time} mode removes unreferenced static variables
-and functions. This may result in undefined references
-when an @code{asm} statement refers directly to variables or functions
-that are otherwise unused. In that case either the variable/function
-shall be listed as an operand of the @code{asm} statement operand or,
-in the case of top-level @code{asm} statements the attribute @code{used}
-shall be used on the declaration.
-
-@item
-Static functions now can use non-standard passing conventions that
-may break @code{asm} statements calling functions directly. Again,
-attribute @code{used} will prevent this behavior.
-@end itemize
-
-As a temporary workaround, @option{-fno-unit-at-a-time} can be used,
-but this scheme may not be supported by future releases of GCC@.
+This option is left for compatibility reasons. @option{-funit-at-a-time}
+has no effect, while @option{-fno-unit-at-a-time} implies
+@option{-fno-toplevel-reorder} and @option{-fno-section-anchors}.
-Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
+Enabled by default.
@item -fno-toplevel-reorder
@opindex fno-toplevel-reorder
@@ -6359,6 +6327,10 @@ will not be removed. This option is intended to support existing code
which relies on a particular ordering. For new code, it is better to
use attributes.
+Enabled at level @option{-O0}. When disabled explicitly, it also imply
+@option{-fno-section-anchors} that is otherwise enabled at @option{-O0} on some
+targets.
+
@item -fweb
@opindex fweb
Constructs webs as commonly used for register allocation purposes and assign
@@ -6944,12 +6916,10 @@ limit after inlining inlining is constrained by
@option{--param large-function-growth}. This parameter is useful primarily
to avoid extreme compilation time caused by non-linear algorithms used by the
backend.
-This parameter is ignored when @option{-funit-at-a-time} is not used.
The default value is 2700.
@item large-function-growth
Specifies maximal growth of large function caused by inlining in percents.
-This parameter is ignored when @option{-funit-at-a-time} is not used.
The default value is 100 which limits large function growth to 2.0 times
the original size.
@@ -6966,7 +6936,6 @@ before applying @option{--param inline-unit-growth}. The default is 10000
@item inline-unit-growth
Specifies maximal overall growth of the compilation unit caused by inlining.
-This parameter is ignored when @option{-funit-at-a-time} is not used.
The default value is 30 which limits unit growth to 1.3 times the original
size.
@@ -15616,7 +15585,7 @@ for any cases where this rule is relaxed.
@item Each of the following options must be the same when building and using
the precompiled header:
-@gccoptlist{-fexceptions -funit-at-a-time}
+@gccoptlist{-fexceptions}
@item
Some other command-line options starting with @option{-f},