Table 15 Levels of optimization
Level | Optimizations |
| |
|
| ||
0 | Local optimizations, including constant folding and partial evaluation of test conditions. | ||
|
|
| |
1 | Peephole optimizations, including: |
| |
| • | Basic block optimizations |
|
| • | Branch optimizations |
|
| • | Instruction scheduling |
|
|
|
| |
2 | Optimizations performed at level 1, plus the following: |
| |
| • | Coloring register allocation |
|
| • Induction variables and strength reduction |
| |
| • | Common subexpression elimination |
|
| • Loop invariant code motion |
| |
| • | Store/copy optimization |
|
| • | Unused definition elimination |
|
| • | Dataflow analysis |
|
| • | Software pipelining |
|
| • | Scalar replacement |
|
| • | Sum reduction optimization |
|
|
|
| |
3 | Optimizations performed at levels 1 and 2, plus the following: |
| |
| • Interprocedural optimizations, including cloning and inlining |
| |
| • Loop transformations to improve memory performance, including fusion and interchange | ||
|
| ||
4 | Level 4 optimizations are not currently supported by the | ||
| compiler will issue a warning message and compile at optimization level 3. |
| |
| For Itanium® applications, performs level 3as well as doing interprocedural optimizations across | ||
| translation units (link time optimizations). Object files generated at this level contain an intermediate | ||
| representation of the user code and are intended to be temporary files. These intermediate object | ||
| files are not guaranteed to be compatible from one version of the compiler to the next. This | ||
| requires concurrent use of the +Oprofile=use option. |
| |
| Decrease the optimization to optlevel for one or more specified routines. This option can | ||
| occur at optimization levels 1, 2, 3, or 4. The option cannot raise the optimization level above | ||
| what was specified in the+Ooptlevel option. This option can occur multiple times, possibly | ||
| with different values of optlevel. |
| |
|
| ||
| a.out will be overwritten if it exists, or created if it does not. The outfile name must not end | ||
| with .f,.f90,.F, i, or .i90. Also, it must not begin with + or | ||
| you may specify only one source file on the command line; the resulting object file is renamed. | ||
|
| ||
+[no]objdebug | This option, when used with any of the | ||
| the object files instead of being placed in the a.out. This will bypass the | pxdb step and the | |
| links will be faster. This is available only for wdb(1) or gdb(1). +objdebug is the default at | ||
| compile time. +noobjdebug can be used at link time to continue to place the debug info into | ||
| the a.out, even if some objects were compiled with +objdebug. |
| |
|
|
|
|
32 Compiling and linking