HP Fortran Programmer's Guide (March 2010)

Performance and optimization
Using options to control optimization
Chapter 6 161
+O[no]promote_indirect_c
alls
+O3 or
higher
Use profile data from profile-based
optimization and other information to
determine the most likely target of indirect
calls and promotes them to direct calls.
Indirect calls occur with pointers to
functions and virtual calls.
In all cases the optimized code tests to
make sure the direct call is being taken
and if not, executes the indirect call. If
+Oinline is in effect, the optimizer may
also inline the promoted calls.
+Opromote_indirect_calls is only
effective with profile-based optimization.
NOTE: The optimizer tries to determine
the most likely target of indirect calls. If
the profile data is incomplete or
ambiguous, the optimizer may not select
the best target. If this happens, your code’s
performance may decrease.
This option can be used at optimization
levels 3 and 4. At +O3, it is only effective if
indirect calls from functions within a file
are mostly to target functions within the
same file. This is because +O3 optimizes
only within a file whereas, +O4 optimizes
across files.
The default is
+Opromote_indirect_calls at
optimization level 3 and above.
+Onopromote_indirect_calls will be the
default at optimization level 2 and below.
+Orarely_called=function
1[,function2...]
All The named functions are assumed to be
rarely called. This option overrides any
information in a profile database.
Table 6-3 Fine-tuning optimization options (Continued)
Option Level Function