Patchwork [wwwdocs] Some news into gcc-4.6

login
register
mail settings
Submitter Jan Hubicka
Date June 22, 2010, 3:03 p.m.
Message ID <20100622150351.GA5565@kam.mff.cuni.cz>
Download mbox | patch
Permalink /patch/56521/
State New
Headers show

Comments

Jan Hubicka - June 22, 2010, 3:03 p.m.
> > +         <li>Improved auto-detection of <code>const</code> and <code>pure</code>
> > +             functions.  Newly <code>noreturn</code> functions are auto-detected.
> > +             <p><code>-fsuggest-attribute</code> flag is available to make compiler
> 
> I think the option is <a
> href="http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options"><code>-Wsuggest-attribute=[const|pure|nothrow]</code></a>
> 
> BTW, the description in the manual does not mention Wsuggest-attribute=nothrow.

It is because nothrow is not implemented yet.  I plan to update patch for that.

Here s updated patch.  I am not sure about HTML way of making linebreak ;)
Manuel López-Ibáñez - June 22, 2010, 3:55 p.m.
2010/6/22 Jan Hubicka <hubicka@ucw.cz>:
>> > +         <li>Improved auto-detection of <code>const</code> and <code>pure</code>
>> > +             functions.  Newly <code>noreturn</code> functions are auto-detected.
>> > +             <p><code>-fsuggest-attribute</code> flag is available to make compiler
>>
>> I think the option is <a
>> href="http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options"><code>-Wsuggest-attribute=[const|pure|nothrow]</code></a>
>>
>> BTW, the description in the manual does not mention Wsuggest-attribute=nothrow.
>
> It is because nothrow is not implemented yet.  I plan to update patch for that.

I confused nothrow with noreturn, that is, noreturn is not listed as an option:

-Wsuggest-attribute=[const|pure]
    Warn for cases where adding an attribute may be beneficial. The
attributes currently supported are listed below.

    -Wsuggest-attribute=pure
    -Wsuggest-attribute=const

(although the description does mention it).

> Here s updated patch.  I am not sure about HTML way of making linebreak ;)

A new line in the rendered text is <br> but that should not be needed.
Yet, you should add real linebreaks to fit within 80 columns.

Cheers,

Manuel.
Gerald Pfeifer - June 22, 2010, 4:52 p.m.
On Tue, 22 Jun 2010, Jan Hubicka wrote:
> +      <li>Interprocedural optimizations improvements</li>

I think that would be "optimimization improvements"?

> +	  <li>Interprocedural framework was re-tuned for link time
> +	      optimization.</li>

"The interprocedural..."

> +	      functions.  Newly; <code>noreturn</code> functions are auto-detected.

"Newly, ...."

> +	      <p><a href="http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options"><code>-Wsuggest-attribute=[const|pure|noreturn]</code></a>

"The <a href=....

> +	      flag is available to make compiler to inform users when adding
> +	      attributes into headers might improve code generation.</p></li>

"available that informs users"
"into" -> "to"


> +	  <li>Inlining heuristics were improved:
> +	      <ul>
> +		 <li>A number of problems with large compilation units was fixed.</li>

How about "Scalability for large compilation units was improved 
significantly"?

> +		 <li>Virtual methods are inlined caller is inlined
> +		     and devirtualization is possible then.</li>

Something is missing/incorrect here?

> +      <li>Datastructures used by dataflow framework in GCC were reorganized

"by the dataflow"

> +	  Compile time of GCC C compiler binary with link time optimization
> +	  has reduced by over 10% (benchmarked on x86-64 target).</li>

"The compile time of the GCC C compiler binary with link-time...went
down by over 10%..."


Thanks for taking the time to document this, Honza.  Please go ahead
and commit a patch looking at the suggestions above, and I will then
have another look and make adjustments if I spot anything.

Gerald
Jan Hubicka - June 22, 2010, 5:09 p.m.
> On Tue, 22 Jun 2010, Jan Hubicka wrote:
> > +      <li>Interprocedural optimizations improvements</li>
> 
> I think that would be "optimimization improvements"?
> 
> > +	  <li>Interprocedural framework was re-tuned for link time
> > +	      optimization.</li>
> 
> "The interprocedural..."
> 
> > +	      functions.  Newly; <code>noreturn</code> functions are auto-detected.
> 
> "Newly, ...."
> 
> > +	      <p><a href="http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options"><code>-Wsuggest-attribute=[const|pure|noreturn]</code></a>
> 
> "The <a href=....
> 
> > +	      flag is available to make compiler to inform users when adding
> > +	      attributes into headers might improve code generation.</p></li>
> 
> "available that informs users"
> "into" -> "to"
> 
> 
> > +	  <li>Inlining heuristics were improved:
> > +	      <ul>
> > +		 <li>A number of problems with large compilation units was fixed.</li>
> 
> How about "Scalability for large compilation units was improved 
> significantly"?
> 
> > +		 <li>Virtual methods are inlined caller is inlined
> > +		     and devirtualization is possible then.</li>
> 
> Something is missing/incorrect here?

Ah, should not write those things late in night :)
It should be Virtual methods are inlined when caller is inlined and devirtualization is possible then.

It is Martin's indirect inlining change.

Honza

Patch

Index: changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.6/changes.html,v
retrieving revision 1.18
diff -u -r1.18 changes.html
--- changes.html	13 Jun 2010 12:44:28 -0000	1.18
+++ changes.html	22 Jun 2010 15:01:28 -0000
@@ -43,6 +43,34 @@ 
       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 optimizations improvements</li>
+      <ul>
+	  <li>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><a href="http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options"><code>-Wsuggest-attribute=[const|pure|noreturn]</code></a>
+	      flag is available to make compiler to inform users when adding
+	      attributes into headers might improve code generation.</p></li>
+	  <li>Inlining heuristics were improved:
+	      <ul>
+		 <li>A number of problems with large compilation units was fixed.</li>
+		 <li>Inlining of callbacks is now more aggressive.</li>
+		 <li>Virtual methods are inlined caller is inlined
+		     and devirtualization is possible then.</li>
+	      </ul>
+	  <li>
+	</ul>
+  </ul>
+
+<h2>Compile time and memory usage improvements</h2>
+  <ul>
+      <li>Datastructures used by dataflow framework in GCC were reorganized
+	  for better memory usage and more cache locality.  Compile
+	  time is improved especially on units with large functions (possibly
+	  resulting from a lot of inlining) not fitting in processor cache.
+	  Compile time of GCC C compiler binary with link time optimization
+	  has reduced by over 10% (benchmarked on x86-64 target).</li>
   </ul>
 
 <h2>New Languages and Language specific improvements</h2>