The following patch adds new knob to make GCC perform several iterations of 
early optimizations and inlining.

This is for dont-care-about-compile-time-optimize-all-you-can scenarios.  
Performing several iterations of optimizations does significantly improve code 
speed on a certain proprietary source base.  Some hand-tuning of the parameter 
value is required to get optimum performance.  Another good use for this option 
is for search and ad-hoc analysis of cases where GCC misses optimization 
opportunities.

With the default setting of '1', nothing is changed from the current status quo.

The patch was bootstrapped and regtested with 3 iterations set by default on 
i686-linux-gnu.  The only failures in regression testsuite were due to latent 
bugs in handling of EH information, which are being discussed in a different 
thread.

Performance impact on the standard benchmarks is not conclusive, there are 
improvements in SPEC2000 of up to 4% and regressions down to -2%, see [*].  
SPEC2006 benchmarks will take another day or two to complete and I will update 
the spreadsheet then.  The benchmarks were run on a Core2 system for all 
combinations of {-m32/-m64}{-O2/-O3}.

Effect on compilation time is fairly predictable, about 10% compile time 
increase with 3 iterations.

OK for trunk?

[*] 
https://docs.google.com/spreadsheet/ccc?key=0AvK0Y-Pgj7bNdFBQMEJ6d3laeFdvdk9lQ1p0LUFkVFE&hl=en_US

Thank you,

--
Maxim Kuvyrkov
CodeSourcery / Mentor Graphics


Attachment: fsf-gcc-iter-eipa.ChangeLog
Description: Binary data

Attachment: fsf-gcc-iter-eipa.patch
Description: Binary data

Reply via email to