This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [wwwdocs,committed] 4.5/changes.html: Add link to manual for -flto


On 10/16/2009 11:31 PM, Gerald Pfeifer wrote:
> On Thu, 15 Oct 2009, Tobias Burnus wrote:
>   
>> My hope is that this increases the chance that people read the relevant
>> entry in the manual and that they thus realize
>> a) that -flto has to be used at both compile and link time -- and
>> b) that -fwhole-program is not implied by -flto
>>     
> Yes, those are two pitfalls we'll encounter regularily.  I wonder 
> whether in addition to adding the link (which is surely fine), you
> may want to put these two points into the changes.html file as well?
>   

How about the following? (I copied the strings from the -flto entry. It
indirectly points to -fwhopr, which is presumably okay: That way the
option is made know, but not too prominently - especially as -fwhopr
does not work properly, yet.)

Tobias


Index: changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.5/changes.html,v
retrieving revision 1.42
diff -U10 -r1.42 changes.html
--- changes.html        17 Oct 2009 11:20:34 -0000      1.42
+++ changes.html        19 Oct 2009 15:09:29 -0000
@@ -51,21 +51,29 @@
     <li>A new link-time optimizer has been added (<code><a
    
href="http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-flto-795";
     >-flto</a></code>).
     When this flag is used, GCC generates a bytecode representation of
     each input file and writes it to special ELF sections in each
     object file.  When the object files are linked together, all the
     function bodies are read from these ELF sections and instantiated
     as if they had been part of the same translation unit.  This
     enables interprocedural optimizations to work across different
     files (and even different languages), potentially improving the
-    performance of the generated code.</li>
+    performance of the generated code. To use the link-timer optimizer,
+    <code>-flto</code> needs to be specified at compile time and during
+    the final link. If the program does not require any symbols to be
+    exported, it is possible to combine -flto and <code><a
+   
href="http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fwhopr-796";
+    >-fwhopr</a></code> with <code><a
+   
href="http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fwhole_002dprogram-794";
+    >-fwhole-program</a></code> to allow the interprocedural optimizers
+    to use more aggressive assumptions.</li>

   </ul>

 <h2>New Languages and Language specific improvements</h2>

 <h3>All languages</h3>
   <ul>
     <li>The <code>-fshow-column</code> option is now on by default.  This
     means error messages now have a column associated with them.</li>
   </ul>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]