HP C Programmer's Guide (92434-90009)

Chapter 4 73
Optimizing HP C Programs
Controlling Specific Optimizer Features
+O[no]fastaccess
Optimization level(s): 0, 1, 2, 3, 4
Default: +Onofastaccess at optimization levels 0, 1, 2 and 3, +Ofastaccess at
optimization level 4
The +Ofastaccess option optimizes for fast access to global data items.
Use +Ofastaccess to improve execution speed at the expense of longer compile times.
+O[no]fltacc
Optimization level(s): 2, 3, 4
Default: +Ofltacc at levels 2, 3, and 4
The +Onofltacc option allows the compiler to perform floating-point optimizations that
are algebraically correct but that may result in numerical differences. In general, these
differences will be insignificant.
The +Onofltacc option also enables the optimizer to generate fused multiply-add (FMA)
instructions. This optimization is enabled by default at optimization level 2 or higher.
Specifying +Ofltacc disables the generation of FMA instructions as well as other
floating-point optimizations. Use +Ofltacc if it is important that the compiler evaluate
floating-point expression according to the order specified by the language standard.
Use the +Onofltacc option at optimization level 2 or higher. If you are optimizing code at
level 2 or higher and do not specify +Onofltacc or +Ofltacc, the optimizer will use FMA
instructions, but will not perform floating-point optimizations that involve expression
reordering.
At optimization level 2 or higher, the optimizer fuses adjacent multiply and add
operations. Fused Multiply-Add (FMA) is implemented by the FMPYFADD and FMPYNFADD
instructions and improves performance but occasionally produces results that may differ
in accuracy from results produced by code without FMA. In general, the differences are
slight.
FMA instructions are only available on PA-RISC 2.0 systems.
The +Ofltacc option disables fusing.
+O[no]global_ptrs_unique [=
name1,name2, ...nameN
]
Optimization level(s): 2, 3, 4
Default: +Onoglobal_ptrs_unique
Use this option to identify unique global pointers, so that the optimizer can generate more
efficient code in the presence of unique pointers, for example by using copy propagation
and common sub-expression elimination. A global pointer is unique if it does not alias with
any variable in the entire program.
This option supports a comma-separated list of unique global pointer variable names.
Refer to your online
HP C Online Reference
for examples.