This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[wwwdocs] IPA and LTO updates
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org, gerald at pfeifer dot com
- Date: Sun, 14 Nov 2010 18:00:56 +0100
- Subject: [wwwdocs] IPA and LTO updates
Hi,
here are some updates to changes.html for new LTO stuff I can think of.
Honza
Index: changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.6/changes.html,v
retrieving revision 1.52
diff -c -p -r1.52 changes.html
*** changes.html 21 Oct 2010 16:02:11 -0000 1.52
--- changes.html 14 Nov 2010 16:58:44 -0000
***************
*** 48,63 ****
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 optimimization 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
--- 48,93 ----
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><A HREF="http://gcc.gnu.org/projects/lto/whopr.pdf">Scalable Whole
! Program Optimizer (WHOPR)</A> project got into useable shape and replaced
! by default the serial LTO optimization model. Link time optimization
! can now split itself into multiple parallel complications. The parallelizm
! is controlled using using <tt>-flto=</tt><em>n</em> (where
! <em>n</em> specify number of parallel compilations to execute. GCC
! can also cooperate with GNU make job server
! by specifying <tt>-flto=jobserv</tt> option and adding <tt>+</tt> in the
! beginning of <tt>Makefile</tt> rule executing the linker.
! <li>Large number of bugs was fixed. GCC now bootstrap with the link
! time optimization and builds working Mozilla Firefox as well as other
! large applications.</li>
! <li>Resolution information from the linker plugin is now used to drive
! whole program assumptions. Use of linker plugin results in a lot stronger
! 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 explicitly
! annotated with <tt> externally_visible</tt> when the linker plugin is not used</li>
! <li>C++ inline functions and virtual tables are now more aggressively privatized
! 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
! 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,
! 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>
<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:
<ul>
<li>Partial inlining is now supported and enabled by default
at <code>-O2</code> and greater. The feature can be
***************
*** 71,82 ****
</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
--- 101,125 ----
</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
+ or when compilig with <tt>-Os</tt>) was improved to handle
+ better C++ program with larger abstraction penalty leading
+ to smaller code size and better performance.</li>
</ul>
</li>
+ <li>IPA reference optimization pass detecting global variables used
+ 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
***************
*** 116,121 ****
--- 159,169 ----
<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
+ or exception handling. This is the case of most of the library functions
+ that have no callbacks.</tt>
</ul>
<h3 id="C">C</h3>