HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)
the results obtained with these options are adequately similar to those obtained without
the optimization.
For applications in which round-off error has been carefully studied, and the order of
computation carefully crafted to control error, these options may be unsatisfactory. To
insure the same result as in unoptimized code, use +Ofltacc.
Example:
All the options, except +Ofltacc=strict, allow the compiler to replace a division by
a multiplication using the reciprocal. For example, the following code:
for (int j=1;j<5;j++)
a[j] = b[j] / x;
is transformed as follows (note that x is invariant in the loop):
x_inv = 1.0/x;
for (int j=1;j<5;j++)
a[j] = b[j] * x_inv;
Since multiplication is considerably faster than division, the optimized program runs
faster.
+Ofrequently_called
+Ofrequently_called=function1[,function2...]
The named functions are assumed to be frequently called. This option overrides any
information in a profile database.
+Ofrequently_called:filename
The file indicated by filename contains a list of functions, separated by spaces or
newlines. These functions are assumed to be frequently called. This option overrides any
information in a profile database.
+O[no]initcheck
+O[no]initcheck
The initialization checking feature of the optimizer can be on or off:
When on (+Oinitcheck), the optimizer issues warning messages when it discovers
uninitialized variables.
When off (+Onoinitcheck), the optimizer does not issue warning messages.
Use +Oinitcheck at optimization level 2 or above. If this option is used together with
+check=uninit, uninitialized variables will remain uninitialized so that an error will
be reported at runtime and trigger a program abort if the variables are accessed.
+O[no]inline
+O[no]inline
Code Optimizing Options 71