This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [wwwdocs] IPA and LTO updates
Hello Jan,
if I may point out a few nits:
* Jan Hubicka wrote on Sun, Nov 21, 2010 at 12:25:03AM CET:
> *** changes.html 20 Nov 2010 20:00:13 -0000 1.63
> --- changes.html 20 Nov 2010 23:24:41 -0000
> ***************
> *** 56,71 ****
> with options that can affect standards compliance but result in
> better optimized code. For example <code>-Ofast</code> enables
> <code>-ffast-math</code>.</li>
> <li>Interprocedural optimization improvements
> <ul>
> <li>The interprocedural framework was re-tuned for link time
> ! optimization.</li>
> <li>Improved auto-detection of <code>const</code> and <code>pure</code>
> functions. Newly, <code>noreturn</code> functions are auto-detected.
> <p>The <a href="http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options"><code>-Wsuggest-attribute=[const|pure|noreturn]</code></a>
> flag is available that informs users when adding
> attributes to headers might improve code generation.</p></li>
> ! <li>Inlining heuristics were improved:
> <ul>
> <li>Partial inlining is now supported and enabled by default
> at <code>-O2</code> and greater. The feature can be
> --- 56,103 ----
> with options that can affect standards compliance but result in
> better optimized code. For example <code>-Ofast</code> enables
> <code>-ffast-math</code>.</li>
> + <li>Link-time optimization improvements
> + <ul>
> + <li>The <a href="http://gcc.gnu.org/projects/lto/whopr.pdf">Scalable Whole
> + Program Optimizer (WHOPR)</a> project has stabilized to the point of being
> + usable. It is now the new default mode when using the LTO optimization
> + model. Link time optimization
> + can now split itself into multiple parallel complications. Parallelism
s/complications/compilations/
> + is controlled with <tt>-flto=</tt><em>n</em> (where
> + <em>n</em> specifies number of parallel compilations to execute. GCC
> + can also cooperate with GNU make job server
> + by specifying <tt>-flto=jobserver</tt> option and adding <tt>+</tt> in the
s/specifying/& the/
> + beginning of <tt>Makefile</tt> rule executing the linker.
to the beginning of the
> + <li>A large number of bugs were fixed. GCC can now bootstrap with LTO
> + enabled. Additionally, Mozilla Firefox and other large applications can
> + be built with LTO enabled.</li>
> + <li>Resolution information from the linker plugin is now used to drive
> + whole program assumptions. Use of linker plugin results in more aggressive
> + optimization on binaries and on shared libraries that use the hidden
> + visibility attribute.</li>
> + <li>Hidden symbols used from non-link time objects now has to be
s/has/have/
> + explicitly annotated with <tt> externally_visible</tt> when the
> + linker plugin is not used</li>
period after user.
> + <li>C++ inline functions and virtual tables are now more aggressively privatized
comma at the end
> + leading to better inter-procedural optimization and faster dynamic linking.</li>
> + <li>Memory usage and intermediate language streaming performance was improved.</li>
> + <li>Static constructors and destructors from individual units are inlined into
> + a single function.
> + This can significantly improve startup times of large C++ applications where
> + static constructors are very common. Static constructor is implied by, for example,
I'd write:
For example, static contructors are used when including ...
> + including <tt>iostream</tt> header.</li>
> + </ul>
> + </li>
> <li>Interprocedural optimization improvements
> <ul>
> <li>The interprocedural framework was re-tuned for link time
> ! optimization. Several scalability issues was solved.</li>
s/was/have been/
> <li>Improved auto-detection of <code>const</code> and <code>pure</code>
> functions. Newly, <code>noreturn</code> functions are auto-detected.
> <p>The <a href="http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options"><code>-Wsuggest-attribute=[const|pure|noreturn]</code></a>
> flag is available that informs users when adding
> attributes to headers might improve code generation.</p></li>
> ! <li>Number of various inlining heuristic improvements. In particular:
A number of inlining ...
> <ul>
> <li>Partial inlining is now supported and enabled by default
> at <code>-O2</code> and greater. The feature can be
> ***************
> *** 79,90 ****
> </p>
> </li>
> <li>Scalability for large compilation units was improved
> ! significantly.</li>
> <li>Inlining of callbacks is now more aggressive.</li>
> <li>Virtual methods considered for inlining when caller is
> inlined and devirtualization is possible then.</li>
> </ul>
> </li>
> </ul>
> </li>
> <li>A new switch <code>-fstack-usage</code> has been added. It makes
> --- 111,135 ----
> </p>
> </li>
> <li>Scalability for large compilation units was improved
> ! significantly.</li>
> <li>Inlining of callbacks is now more aggressive.</li>
> <li>Virtual methods considered for inlining when caller is
> inlined and devirtualization is possible then.</li>
> + <li>Inlining when optimizing for size (either in cold regions of program
of a program
> + or when compilig with <tt>-Os</tt>) was improved to handle
compiling
> + better C++ program with larger abstraction penalty leading
s/\(better \)\(.*penalty \)/\2\1,/
> + to smaller code size and better performance.</li>
> </ul>
> </li>
> + <li>IPA reference optimization pass detecting global variables used
The IPA ...
> + or modified by functions was strengthened and sped up.</li>
> + <li>Functions whose address was taken can now be optimized out when
> + all references to them are dead.</li>
> + <li>A new inter-procedural static profile estimation pass detecting
> + functions that are executed once or unlikely executed.
> + Unlikely executed functions are optimized for size. Functions
> + executed once are optimized for size except for the inner
> + loops.</li>
> </ul>
> </li>
> <li>A new switch <code>-fstack-usage</code> has been added. It makes
> ***************
> *** 124,129 ****
> --- 169,179 ----
> <code>float</code> is implicitly promoted to <code>double</code>.
> This is especially helpful for CPUs that handle the former in
> hardware, but emulate the latter in software.</li>
> + <li>A new function attribute <code>leaf</code> was introduced.
> + This attribute allows better inter-procedural optimization across
> + calls to functions that return tu the current unit only via returning
s/tu/to/
> + or exception handling. This is the case of most of the library functions
> + that have no callbacks.</tt>
> </ul>
>
> <h3 id="c">C</h3>
Cheers,
Ralf