12. Performance of COINS compilers

COINS supports a wide range of optimizations such as SSA based optimizations and conventional optimizations based on data-flow analysis. These optimizations are selectable by the compiler optins. The backend process of COINS also has several basic optimization processes such as register allocation, jump optimization, constant foldings. These optimizations are always applied by default.

The relative execution times of the SPEC benchmarks are shown in Fig.12-1.


Fig.12-1 Relative excecution time of SPEC benchmark

In this figure, "COINS O0" means "COINS compiler: no optimization selected (only backend optimizations)", and "gcc O2" means "gcc compiler: with compiler option -O2". The target machine is x86 (Pentium 4).

This figure shows the good performance of the backend optimizations.

The effects of SSA optimizations and some added optimizations are shown in Fig.12-2.


Fig.12-2 Result of optimizations

In this figure, the execution times of small programs are compared, where:
isort:   insertion sort
ssort:   selection sort
heap:    heap sort
shell:   shell sort
queen:   8-queen
soukan:  correlation coefficient
komachi: "komachi" calculation
prime:   prime number

COINS O0:  COINS C compiler, no optimization selected
COINS ssa:  COINS C compiler, with compiler options
            -coins:ssa-opt=prun/divex/cse/cstp/hli/osr/hli/cstp/cse/dce/srd3
COINS ssa+S+R: COINS C compiler, with compiler options
            -coins:ssa-opt=prun/divex/cse/cstp/hli/osr/hli/cstp/cse/dce/srd3,
                   attach=coins.backend.sched.Schedule,schedule,attach=Regromote,regpromote
gcc O2:     gcc compiler, with compiler options "-O2"

target machine:  SPARC (Sun Blade 1000)
"S" of "ssa+S+R" means instruction scheduling (with "nop"-instruction elimination, in case of SPARC), and "R" means register promotion of static variables. See 11.2.1. Example 1: Instruction Scheduler for "S", and see 11.2.2. Example 2: Register Promotion for "R".

These are the added optimizations using the hook features of the backend process.