Commit 70281a8e by Sandra Loosemore Committed by Sandra Loosemore

invoke.texi ([-fprofile-generate], [...]): Fix markup, light copy-editing.

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

	gcc/
	* doc/invoke.texi ([-fprofile-generate], [-fprofile-use]):
	Fix markup, light copy-editing.
	([-fauto-profile]): Rewrite to fix formatting and content
	problems.

From-SVN: r219172
parent 3fd99bca
2015-01-03 Sandra Loosemore <sandra@codesourcery.com> 2015-01-03 Sandra Loosemore <sandra@codesourcery.com>
* doc/invoke.texi ([-fprofile-generate], [-fprofile-use]):
Fix markup, light copy-editing.
([-fauto-profile]): Rewrite to fix formatting and content
problems.
2015-01-03 Sandra Loosemore <sandra@codesourcery.com>
* doc/invoke.texi ([-fisolate-erroneous-paths-dereference]): * doc/invoke.texi ([-fisolate-erroneous-paths-dereference]):
Copy-edit description. Copy-edit description.
([-fisolate-erroneous-paths-attribute]): Likewise. ([-fisolate-erroneous-paths-attribute]): Likewise.
......
...@@ -9325,7 +9325,7 @@ profile useful for later recompilation with profile feedback based ...@@ -9325,7 +9325,7 @@ profile useful for later recompilation with profile feedback based
optimization. You must use @option{-fprofile-generate} both when optimization. You must use @option{-fprofile-generate} both when
compiling and when linking your program. compiling and when linking your program.
The following options are enabled: @code{-fprofile-arcs}, @code{-fprofile-values}, @code{-fvpt}. The following options are enabled: @option{-fprofile-arcs}, @option{-fprofile-values}, @option{-fvpt}.
If @var{path} is specified, GCC looks at the @var{path} to find If @var{path} is specified, GCC looks at the @var{path} to find
the profile feedback data files. See @option{-fprofile-dir}. the profile feedback data files. See @option{-fprofile-dir}.
...@@ -9333,12 +9333,12 @@ the profile feedback data files. See @option{-fprofile-dir}. ...@@ -9333,12 +9333,12 @@ the profile feedback data files. See @option{-fprofile-dir}.
@item -fprofile-use @item -fprofile-use
@itemx -fprofile-use=@var{path} @itemx -fprofile-use=@var{path}
@opindex fprofile-use @opindex fprofile-use
Enable profile feedback directed optimizations, and optimizations Enable profile feedback-directed optimizations,
generally profitable only with profile feedback available. and the following optimizations
which are generally profitable only with profile feedback available:
The following options are enabled: @code{-fbranch-probabilities}, @code{-fvpt}, @option{-fbranch-probabilities}, @option{-fvpt},
@code{-funroll-loops}, @code{-fpeel-loops}, @code{-ftracer}, @code{-ftree-vectorize}, @option{-funroll-loops}, @option{-fpeel-loops}, @option{-ftracer},
@code{ftree-loop-distribute-patterns} @option{-ftree-vectorize}, and @option{ftree-loop-distribute-patterns}.
By default, GCC emits an error message if the feedback profiles do not By default, GCC emits an error message if the feedback profiles do not
match the source code. This error can be turned into a warning by using match the source code. This error can be turned into a warning by using
...@@ -9351,37 +9351,39 @@ the profile feedback data files. See @option{-fprofile-dir}. ...@@ -9351,37 +9351,39 @@ the profile feedback data files. See @option{-fprofile-dir}.
@item -fauto-profile @item -fauto-profile
@itemx -fauto-profile=@var{path} @itemx -fauto-profile=@var{path}
@opindex fauto-profile @opindex fauto-profile
Enable sampling based feedback directed optimizations, and optimizations Enable sampling-based feedback-directed optimizations,
generally profitable only with profile feedback available. and the following optimizations
which are generally profitable only with profile feedback available:
The following options are enabled: @code{-fbranch-probabilities}, @code{-fvpt}, @option{-fbranch-probabilities}, @option{-fvpt},
@code{-funroll-loops}, @code{-fpeel-loops}, @code{-ftracer}, @code{-ftree-vectorize}, @option{-funroll-loops}, @option{-fpeel-loops}, @option{-ftracer},
@code{-finline-functions}, @code{-fipa-cp}, @code{-fipa-cp-clone}, @option{-ftree-vectorize},
@code{-fpredictive-commoning}, @code{-funswitch-loops}, @option{-finline-functions}, @option{-fipa-cp}, @option{-fipa-cp-clone},
@code{-fgcse-after-reload}, @code{-ftree-loop-distribute-patterns}, @option{-fpredictive-commoning}, @option{-funswitch-loops},
@option{-fgcse-after-reload}, and @option{-ftree-loop-distribute-patterns}.
If @var{path} is specified, GCC looks at the @var{path} to find
the profile feedback data files. @var{path} is the name of a file containing AutoFDO profile information.
If omitted, it defaults to @file{fbdata.afdo} in the current directory.
In order to collect AutoFDO profile, you need to have:
Producing an AutoFDO profile data file requires running your program
1. A linux system with linux perf support with the @command{perf} utility on a supported GNU/Linux target system.
2. (optional) An Intel processor with last branch record (LBR) support. This is For more information, see @uref{https://perf.wiki.kernel.org/}.
to guarantee accurate instruction level profile, which is important for
AutoFDO performance.
To collect the profile, first use linux perf to collect raw profile
(see @uref{https://perf.wiki.kernel.org/}).
E.g. E.g.
@code{perf record -e br_inst_retired:near_taken -b -o perf.data -- your_program} @smallexample
perf record -e br_inst_retired:near_taken -b -o perf.data \
-- your_program
@end smallexample
Then use create_gcov tool, which takes raw profile and unstripped binary to Then use the @command{create_gcov} tool to convert the raw profile data
generate AutoFDO profile that can be used by GCC. to a format that can be used by GCC.@ You must also supply the
(see @uref{https://github.com/google/autofdo}). unstripped binary for your program to this tool.
See @uref{https://github.com/google/autofdo}.
E.g. E.g.
@code{create_gcov --binary=your_program.unstripped --profile=perf.data --gcov=profile.afdo} @smallexample
create_gcov --binary=your_program.unstripped --profile=perf.data \
--gcov=profile.afdo
@end smallexample
@end table @end table
The following options control compiler behavior regarding floating-point The following options control compiler behavior regarding floating-point
......
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