HP aC++/HP C A.06.20 Programmer's Guide
Enabling Aggressive Optimizations
To enable aggressive optimizations at the second, third, or fourth optimization levels,
use the +Ofast option as follows:
aCC +Ofast +O2 sourcefile.C
or:
aCC +Ofast +O3 sourcefile.C
or:
aCC +Ofast +O4 sourcefile.C
This option enables additional optimizations at each level.
NOTE: Use aggressive optimizations with stable, well-structured code. These types
of optimizations give you faster code, but may change the behavior of programs.
These optimizations may do any of the following:
• Relocate conditional floating-point instructions from within loops
• Convert certain library calls to millicode and inline instructions
• Alter error-handling requirements
Enabling Only Conservative Optimizations
You can enable only conservative optimizations at the second, third, or fourth
optimization levels by using the +Ofltacc=strict +Ofenvaccess option, as
follows:
aCC +O2 +Ofltacc=strict +Ofenvaccess sourcefile.C
or:
aCC +O3 +Ofltacc=strict +Ofenvaccess sourcefile.C
or:
aCC +O4 +Ofltacc=strict +Ofenvaccess sourcefile.C
This option disables all but the most conservative optimizations at each level.
Conservative optimizations do not change the behavior of code, in most cases, even if
the code does not conform to standards.
Use only conservative optimizations provided with level 2, 3, and 4 when your code
is unstructured.
Removing Compilation Time Limits When Optimizing
You can remove optimization time restrictions at the second, third, or fourth
optimization levels by using the +Onolimit option as follows:
aCC +O2 +Onolimit sourcefile.C
or:
Requesting Optimization 203