HP Fortran Programmer Guide HP-UX 11i v1, HP-UX 11i v2, and HP-UX 11i v3 (B3908-90032,December 2012)
Table 15 Levels of optimization (continued)
OptimizationsLevel
• Scalar replacement
• Sum reduction optimization
Optimizations performed at levels 1 and 2, plus the following:3
• Interprocedural optimizations, including cloning and inlining
• Loop transformations to improve memory performance, including fusion and interchange
Level 4 optimizations are not currently supported by the PA-RISC compiler. If +O4is specified, the
compiler will issue a warning message and compile at optimization level 3.
4
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=useoption.
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.
-onames the executable file outfilerather than the default name of a.out. If not specified,
a.outwill be overwritten if it exists, or created if it does not. The outfilename must not end
-ooutfile
with .f,.f90,.F, i, or .i90. Also, it must not begin with + or -. When using -cand -otogether,
you may specify only one source file on the command line; the resulting object file is renamed.
This option, when used with any of the -goptions, will cause the debug information to be left in
the object files instead of being placed in the a.out. This will bypass the pxdb step and the
+[no]objdebug
links will be faster. This is available only for wdb(1) or gdb(1). +objdebugis the default at
compile time. +noobjdebugcan be used at link time to continue to place the debug info into
the a.out, even if some objects were compiled with +objdebug.
NOTE: Object files and archive libraries must be accessible to the debugger if the
+objdebugmethod of storing debug information is used.
+onetripgenerates code that executes any DOloop at least once. In accordance with the
language standard, HP Fortran will not execute a DO loop if either of the following conditions
is true:
+[no]onetrip
• The increment value is greater than zero, and the initial value is greater than the limit.
• The increment value is less than zero, and the initial value is less than the limit.
However, older implementations of Fortran (for example, some FORTRAN 66 processors) always
execute a DO loop at least once. The +onetrip option provides compatibility with those
nonstandard implementations.
The default is +noonetrip.
Generate code for prof(1) profiling. The has the same functionality as the +profoption. The
default is +noprof.
-p
Optimize the application based on profile data found in the database fileflow.data , produced
by compilation with +Ild(1), +I, and +df, for more details. The +Poption is incompatible
with the +Iand -Soptions. It is incompatible with the -goption only during compile time.
+P
NOTE: This option is only valid on Itanium®-based systems.
+pa1compiles an application for routine-level profiling.+pa1
Command-line options 31