Optimal Optimizations: A Very Preliminary Report

Nathanael Nerode neroden@twcny.rr.com
Tue Aug 12 17:39:00 GMT 2003


Diego Novillo wrote:
>As I see it, the problem has at least three dimensions:
>
>     1. Selection of optimization options
>     2. Ordering of the different passes
>     3. Programs used as benchmarks
>
>Ideally, one would explore that 3 dimensional space and cut slices to
>stick in the different -Ox.  GCC will let you play with #1 (to a 
>certain extent) and #3, but you cannot change #2.

With some notable exceptions, such as -fschedule-insns vs. 
-fschedule-insns2.

(Incidentally, the evidence for that particular case indicates that 
-fschedule-insns should be abandoned entirely, while -fschedule-insns2 
should be standard.)

Actually, #2 is an interesting point: 'common sense' and 
reasoning actually do a pretty good job of determining the correct
order for passes.  (For example, I guessed before seeing any data 
that insn scheduling ought to be post-regalloc, and I appear to have 
been correct.)  Common sense and reasoning don't seem to do such a good 
job at determing what passes are worthwhile (#1) or what programs are 
good benchmarks (#3).

-- 
Nathanael Nerode  <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html



More information about the Gcc mailing list