HP Fortran Programmer Guide HP-UX 11i v1, HP-UX 11i v2, and HP-UX 11i v3 (B3908-90032,December 2012)

+O[no]infooption, which provides compile-time information about the optimization process, is
described in the same section.
NOTE: You can insert (or remove) underscore characters in the names of any of the optimization
options to improve their readability. The compiler will recognize the option name with or without
underscores.
Reviewing general optimization options
The following options allow you to control how optimization affects code size, compilation time,
runtime performance, and other user-visible effects. The syntax for using these options is:
where optimizationis a parameter that specifies the
class of optimization to apply to your program. The
+O[no]optimization
different parameters are described below. The prefix
nonegates the effect of optimization.
Except for +Oall, +Ofastand +Ofasterthe options do not override a specified level of
optimization, nor do they imply a particular level. (The +Oalloption automatically invokes the
highest level of optimization. +Ofastinvokes +O2level of optimization in addition to few other
specific flags described later. Whereas, +Ofasterinvokes +O3level of optimization). To use any
of these options you must also include the +Onoption on the same command line, where nspecifies
the level at which the type of optimization is effective. Thus, if you wish to apply all optimizations
available at level 3 except those that might significantly increase code size, you would use the
command line:
f90 +O3 +Osize my_prog.f90
If an option is mistakenly used at a level at which the corresponding optimization is not performed,
the compiler will issue a warning message.
The defaults specified in the following descriptions are in effect only at the specified optimization
levels, unless stated otherwise.
+Oaggressiveenables optimizations that can result in
significant performance improvement but can also change
+O[no]aggressive
a program’s behavior. This option is only effective at
optimization level 2 or higher.
The +Oaggressiveoption performs optimizations invoked
by the following options:
+Oentrysched
+Olibcalls
+Onofltacc
+Onoinitcheck
+FPD
+FPD is enabled only if +Oaggressiveis used on the
link line.
NOTE: The +Oaggressive option is incompatible with
+Oconservative.
The default is +Onoaggressive.
NOTE: This option is only valid on the PA-RISC systems.
+Oallperforms maximum optimization, including
aggressive optimizations and optimizations that can
+O[no]all
significantly increase compile time and memory usage.
Reviewing general optimization options 37