Technical data
Driver Options
17
Optimizing
The default optimizing option,–O1, causes the code generator and assembler
phases of compilation to improve the performance of your executable object.
You can prevent optimization by specifying –O0.
Table 1-6 summarizes the optimizing functions available.
The default option, –O1, causes the code generator and the assembler to
perform basic optimizations such as constant folding, common
subexpression elimination within individual statements, and common
subexpression elimination between statements.
The global optimizer, invoked with the –O2 option, is a single program that
improves the performance of an object program by transforming existing
code into more efficient coding sequences. Although the same optimizer
processes all compiler optimizations, it does distinguish between the
various languages supported by the compiler system programs to take
advantage of the different language semantics involved.
Table 1-6 Optimizer Options
Option Result
–O3 Performs all optimizations, including global register allocation. With
this option, a ucode object file is created for each Fortran source file and
left in a .u file. The newly created ucode object files, the ucode object
files specified on the command lines, the run-time startup routine,
and all of the run-time libraries are ucode linked. Optimization is done
globally on the resulting ucode linked file, and then it is linked as
normal, producing an a.out file. No .o file is left from the ucode linked
result.
–c cannot be specified with –O3.
–O2 The global optimizer (uopt) phase executes. It performs optimization
only within the bounds of individual compilation units.
–O1 Default option. The code generator and the assembler perform basic
optimizations in a more limited scope.
–O0 No optimization.










