diff options
author | Tobias Burnus <burnus@net-b.de> | 2009-10-06 12:38:12 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2009-10-06 12:38:12 +0200 |
commit | 05927e0d43f9355d7f9fcdb2058d23977a25c680 (patch) | |
tree | bb52001ac420e499d7d7f6376d9f6dbae1e85831 /gcc | |
parent | ccc37454b0bed9759657bef7e4305a414403c7c1 (diff) | |
download | gcc-05927e0d43f9355d7f9fcdb2058d23977a25c680.zip gcc-05927e0d43f9355d7f9fcdb2058d23977a25c680.tar.gz gcc-05927e0d43f9355d7f9fcdb2058d23977a25c680.tar.bz2 |
re PR lto/41591 (documentation should document interaction of -flto and -fwhole-program)
2009-10-06 Tobias Burnus <burnus@net-b.de>
PR lto/41591
* doc/invoke.texi (-flto,-fwhole-program): Make clear that the
-flto and -fwhole-program flags can be combined.
From-SVN: r152490
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 14 |
2 files changed, 17 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 17d2717..78230e8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-10-06 Tobias Burnus <burnus@net-b.de> + + PR lto/41591 + * doc/invoke.texi (-flto,-fwhole-program): Make clear that the + -flto and -fwhole-program flags can be combined. + 2009-10-06 Ryan Mansfield <rmansfield@qnx.com> PR driver/41217 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 3cb309c..75622b3 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -7105,9 +7105,10 @@ and those merged by attribute @code{externally_visible} become static functions and in effect are optimized more aggressively by interprocedural optimizers. While this option is equivalent to proper use of the @code{static} keyword for programs consisting of a single file, in combination with option -@option{--combine} this flag can be used to compile many smaller scale C -programs since the functions and variables become local for the whole combined -compilation unit, not for the single source file itself. +@option{-combine}, @option{-flto} or @option{-fwhopr} this flag can be used to +compile many smaller scale programs since the functions and variables become +local for the whole combined compilation unit, not for the single source file +itself. This option implies @option{-fwhole-file} for Fortran programs. @@ -7245,6 +7246,13 @@ If you are not using @command{gold} and/or do not specify will be extracted and linked as usual, but they will not participate in the LTO optimization process. +Link time optimizations do not require the presence of the whole +program to operate. If the program does not require any symbols to +be exported, it is possible to combine @option{-flto} and +@option{-fwhopr} with @option{-fwhole-program} to allow the +interprocedural optimizers to use more aggressive assumptions which +may lead to improved optimization opportunities. + Regarding portability: the current implementation of LTO makes no attempt at generating bytecode that can be ported between different types of hosts. The bytecode files are versioned and there is a |