HP Fortran Programmer's Guide (B3908-90031; September 2011)

Compiling and linking
Compiling with the f90 command
Chapter 2 47
-O invokes the optimizer, where n is the level of optimization, 0 - 4. The default is
optimization level 2.
This option is provided for compatibility and is functionally the same as the +On option.
The only difference between the two is that the level number is optional for the -O
option. For more information about the levels of optimization, see the +On option.
+On
+O invokes the optimizer, where n is the level of optimization, 0 - 4. The -g option is
compatible with the +O0, +O1, and +O2 options.
Table 2-6 lists and describes the different levels of optimization.
NOTE See the Parallel Programming Guide for HP-UX Systems for a detailed
description of optimization levels and methods.
+O[no]optimization
+O[no] options enable or disable specific optimizations or classes of optimizations
(for example, optimizations that affect compilation time). For detailed information
about +O[no]optimization, see “Using optimization options” on page 60.
Table 2-6 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