Just some simple tests of well known optimizations...

One thing that i really like is tail-recursion being -at last!- handled

                                                  |  gcc  |  gcc  |  gcc  |visual |  
cc   |
                                                  | 2.8.0 |2.95.3 | 2.96  |  5.0  
|4.2-spa|
--------------------------------------------------|-------|-------|-------|-------|-------|
register allocation for local variables           |   6   |   1   |   1   |   5   |   
X   |
register allocation for global variables          |   8   |   5   |   1   |   5   |   
X   |
register allocation for function parameters       |       |   1   |   1   |       |   
X   |
empty loop (static true exit condition)           |   X   |   X   |   X   |   X   |   
X   |
one loop                                          |   X   |   .   |   X   |       |    
   |
aliasing handling with local pointer              |   X   |   X   |   X   |   X   |   
X   |
aliasing handling with extern pointer aliased loca|   X   |   X   |   X   |   X   |   
X   |
aliasing handling with extern pointer aliased exte|   X   |   X   |   X   |   X   |    
   |
aliasing handling with extern pointer aliased exte|       |       |       |   X   |   
X   |
(!) aliasing handling with extern pointer aliased |       |       |       |   X   |    
   |
simple loop invariant code motion                 |   X   |   X   |   X   |   .   |   
X   |
complex loop invariant code motion                |       |   X   |   X   |       |   
.   |
loop invariant code motion                        |   X   |   X   |   X   |   .   |   
.   |
simple code in loop indepedent from loop indice   |       |       |       |   .   |    
   |
complex code in loop indepedent from loop indice  |       |       |       |   .   |    
   |
very simple code in loop indepedent from loop indi|       |       |       |   X   |    
   |
simple loop unrolling                             |   X   |   X   |   X   |   X   |    
   |
complex loop unrolling (needs algebraic simplifica|   X   |   X   |   X   |   X   |    
   |
hoisting                                          |   X   |   X   |   X   |   X   |   
X   |
propagating test information in branches          |   X   |   X   |   X   |   X   |    
   |
simple algebraic simplification                   |   X   |   X   |   X   |   X   |   
X   |
simple algebraic simplification                   |   X   |   X   |   X   |   X   |   
X   |
simple algebraic simplification                   |   X   |   X   |   X   |   X   |    
   |
simple algebraic simplification (commutativity)   |   X   |   X   |   X   |   X   |   
X   |
simple algebraic simplification (division)        |       |       |       |       |    
   |
(!) simple algebraic simplification (division)    |   X   |   X   |   X   |       |    
   |
(!) simple algebraic simplification (division)    |       |       |       |       |    
   |
simple algebraic simplification (division)        |       |       |       |       |    
   |
complex algebraic simplification                  |   X   |   X   |   X   |   X   |    
   |
complex algebraic simplification                  |   X   |   X   |   X   |   X   |    
   |
complex algebraic simplification                  |   .   |   .   |   .   |   .   |    
   |
simple floating point simplification              |   X   |   X   |   .   |   X   |   
X   |
simple floating point simplification              |   X   |   X   |   X   |   X   |   
X   |
simple floating point simplification              |   X   |   X   |   X   |   X   |   
X   |
simple floating point simplification              |   X   |   X   |   X   |   X   |    
   |
simple floating point simplification (commutativit|       |       |   X   |   X   |    
   |
instruction scheduling (register dependencies)    |       |   .   |   .   |       |   
.   |
instruction scheduling (avoid load delays)        |       |       |       |       |   
X   |
instruction scheduling (avoid load delays)        |       |       |   X   |       |   
X   |
simple common sub-expression removing             |   X   |   X   |   X   |   X   |   
X   |
complex common sub-expression removing            |   X   |   X   |   X   |       |   
X   |
partial common sub-expression removing            |       |       |       |       |    
   |
partial common sub-expression removing            |       |       |       |       |    
   |
loop-invariant code motion (unswitching)          |       |       |       |       |    
   |
induction variables detection                     |   X   |   X   |   X   |   X   |   
.   |
leaf-routine optimization                         |   X   |   X   |   X   |   X   |   
.   |
tail-recursion removing                           |       |       |   X   |   X   |   
X   |
tail-call optimization                            |       |       |   X   |   X   |    
   |
use of registers for function call                |       |       |       |       |   
X   |
tail-recursion removing                           |       |       |   X   |   X   |   
X   |

complete stuff: ftp://ftp.mandrakesoft.com/pub/pixel/c-optimizations.tar.bz2

Reply via email to