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

Performance and optimization
Using options to control optimization
Chapter 6 161
+O[no]whole_program_mode +O4 or
higher
Enable the assertion that only the files that are
compiled with this option directly reference any
global variables and procedures that are defined
in these files. In other words, this option asserts
that there are no unseen accesses to the globals.
When this assertion is in effect, the optimizer can
hold global variables in registers longer and
delete inlined or cloned global procedures. This
option is in effect only at +O4 level of
optimization.
All files compiled with
+Owhole_program_mode must also be
compiled with +O4. If any of the files are
compiled with +O4 but are not compiled with
+Owhole_program_mode, the linker disables
the assertion for all files in the program.
Use this option to increase performance speed,
but only when you are certain that only the files
compiled with +Owhole_program_mode
directly access any globals that are defined in
these files.
The default is +Onowhole_program_mode
which disables the assertion.
Table 6-3 Fine-tuning optimization options (Continued)
Option Level Function