Commit dd8d9ac4 by Sandra Loosemore Committed by Sandra Loosemore

invoke.texi ([-fopt-info]): Fix markup, consolidate discussion of defaults, light copy-editing.

2015-01-02  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* doc/invoke.texi ([-fopt-info]): Fix markup, consolidate
	discussion of defaults, light copy-editing.

From-SVN: r219154
parent b0e65755
2015-01-02 Sandra Loosemore <sandra@codesourcery.com>
* doc/invoke.texi ([-fopt-info]): Fix markup, consolidate
discussion of defaults, light copy-editing.
2015-01-02 Bernd Edlinger <bernd.edlinger@hotmail.de> 2015-01-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
* tsan.c (instrument_expr): corrected previous checkin. * tsan.c (instrument_expr): corrected previous checkin.
......
...@@ -6772,52 +6772,37 @@ Enable all the available tree dumps with the flags provided in this option. ...@@ -6772,52 +6772,37 @@ Enable all the available tree dumps with the flags provided in this option.
@opindex fopt-info @opindex fopt-info
Controls optimization dumps from various optimization passes. If the Controls optimization dumps from various optimization passes. If the
@samp{-@var{options}} form is used, @var{options} is a list of @samp{-@var{options}} form is used, @var{options} is a list of
@samp{-} separated options to select the dump details and @samp{-} separated option keywords to select the dump details and
optimizations. If @var{options} is not specified, it defaults to optimizations.
@option{optimized} for details and @option{optall} for optimization
groups. If the @var{filename} is not specified, it defaults to
@file{stderr}. Note that the output @var{filename} will be overwritten
in case of multiple translation units. If a combined output from
multiple translation units is desired, @file{stderr} should be used
instead.
The options can be divided into two groups, 1) options describing the The @var{options} can be divided into two groups: options describing the
verbosity of the dump, and 2) options describing which optimizations verbosity of the dump, and options describing which optimizations
should be included. The options from both the groups can be freely should be included. The options from both the groups can be freely
mixed as they are non-overlapping. However, in case of any conflicts, mixed as they are non-overlapping. However, in case of any conflicts,
the latter options override the earlier options on the command the later options override the earlier options on the command
line. Though multiple -fopt-info options are accepted, only one of line.
them can have @option{=filename}. If other filenames are provided then
all but the first one are ignored.
The dump verbosity has the following options The following options control the dump verbosity:
@table @samp @table @samp
@item optimized @item optimized
Print information when an optimization is successfully applied. It is Print information when an optimization is successfully applied. It is
up to a pass to decide which information is relevant. For example, the up to a pass to decide which information is relevant. For example, the
vectorizer passes print the source location of loops which got vectorizer passes print the source location of loops which are
successfully vectorized. successfully vectorized.
@item missed @item missed
Print information about missed optimizations. Individual passes Print information about missed optimizations. Individual passes
control which information to include in the output. For example, control which information to include in the output.
@smallexample
gcc -O2 -ftree-vectorize -fopt-info-vec-missed
@end smallexample
will print information about missed optimization opportunities from
vectorization passes on stderr.
@item note @item note
Print verbose information about optimizations, such as certain Print verbose information about optimizations, such as certain
transformations, more detailed messages about decisions etc. transformations, more detailed messages about decisions etc.
@item all @item all
Print detailed optimization information. This includes Print detailed optimization information. This includes
@var{optimized}, @var{missed}, and @var{note}. @samp{optimized}, @samp{missed}, and @samp{note}.
@end table @end table
The second set of options describes a group of optimizations and may One or more of the following option keywords can be used to describe a
include one or more of the following. group of optimizations:
@table @samp @table @samp
@item ipa @item ipa
...@@ -6833,47 +6818,69 @@ Enable dumps from all optimizations. This is a superset of ...@@ -6833,47 +6818,69 @@ Enable dumps from all optimizations. This is a superset of
the optimization groups listed above. the optimization groups listed above.
@end table @end table
For example, If @var{options} is
omitted, it defaults to @samp{optimized-optall}, which means to dump all
info about successful optimizations from all the passes.
If the @var{filename} is provided, then the dumps from all the
applicable optimizations are concatenated into the @var{filename}.
Otherwise the dump is output onto @file{stderr}. Though multiple
@option{-fopt-info} options are accepted, only one of them can include
a @var{filename}. If other filenames are provided then all but the
first such option are ignored.
Note that the output @var{filename} is overwritten
in case of multiple translation units. If a combined output from
multiple translation units is desired, @file{stderr} should be used
instead.
In the following example, the optimization info is output to
@file{stderr}:
@smallexample
gcc -O3 -fopt-info
@end smallexample
This example:
@smallexample @smallexample
gcc -O3 -fopt-info-missed=missed.all gcc -O3 -fopt-info-missed=missed.all
@end smallexample @end smallexample
@noindent
outputs missed optimization report from all the passes into outputs missed optimization report from all the passes into
@file{missed.all}. @file{missed.all}, and this one:
As another example,
@smallexample @smallexample
gcc -O3 -fopt-info-inline-optimized-missed=inline.txt gcc -O2 -ftree-vectorize -fopt-info-vec-missed
@end smallexample @end smallexample
will output information about missed optimizations as well as @noindent
optimized locations from all the inlining passes into prints information about missed optimization opportunities from
@file{inline.txt}. vectorization passes on @file{stderr}.
Note that @option{-fopt-info-vec-missed} is equivalent to
If the @var{filename} is provided, then the dumps from all the @option{-fopt-info-missed-vec}.
applicable optimizations are concatenated into the @file{filename}.
Otherwise the dump is output onto @file{stderr}. If @var{options} is
omitted, it defaults to @option{all-optall}, which means dump all
available optimization info from all the passes. In the following
example, all optimization info is output on to @file{stderr}.
As another example,
@smallexample @smallexample
gcc -O3 -fopt-info gcc -O3 -fopt-info-inline-optimized-missed=inline.txt
@end smallexample @end smallexample
Note that @option{-fopt-info-vec-missed} behaves the same as @noindent
@option{-fopt-info-missed-vec}. outputs information about missed optimizations as well as
optimized locations from all the inlining passes into
@file{inline.txt}.
As another example, consider Finally, consider:
@smallexample @smallexample
gcc -fopt-info-vec-missed=vec.miss -fopt-info-loop-optimized=loop.opt gcc -fopt-info-vec-missed=vec.miss -fopt-info-loop-optimized=loop.opt
@end smallexample @end smallexample
@noindent
Here the two output filenames @file{vec.miss} and @file{loop.opt} are Here the two output filenames @file{vec.miss} and @file{loop.opt} are
in conflict since only one output file is allowed. In this case, only in conflict since only one output file is allowed. In this case, only
the first option takes effect and the subsequent options are the first option takes effect and the subsequent options are
ignored. Thus only the @file{vec.miss} is produced which contains ignored. Thus only @file{vec.miss} is produced which contains
dumps from the vectorizer about missed opportunities. dumps from the vectorizer about missed opportunities.
@item -frandom-seed=@var{number} @item -frandom-seed=@var{number}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment