Optimizing Itanium-Based Applications (May 2011)

Optimizing Itanium-Based Applications
19
With +Onoparmsoverlap, the optimizer assumes that subprogram arguments do not refer to
overlapping memory locations. This allows more aggressive optimization and scheduling of pointer-
intensive code.
+O[no]parminit (default +Onoparminit)
Not supported for Fortran.
When enabled, the optimizer inserts instructions to initialize to zero any unspecified function
parameters at call sites. This avoids NaT values in parameter registers. Enabling this option results in
small performance losses, but might be required for correctness.
+O[no]store_ordering (default +Onostore_ordering)
Not supported for Fortran.
Enabling this option forces the optimizer to preserve the original program order for stores to memory
that is possibly visible to another thread. This does not imply strong ordering. This option can be used
to achieve program ordering of stores without using the more conservative volatile semantics applied to
all accesses to global variables with +Ovolatile.
#pragma IF_CONVERT
This block-scoped pragma can be used to indicate that the compiler should employ if-conversion to
eliminate all control flow resulting from conditional code within that scope. If-conversion is the process
by which the compiler uses predicates to eliminate conditional branches. By default at +O2 and higher,
the compiler uses heuristics to determine when it is beneficial to apply if-conversion to eliminate a
conditional branch. This pragma overrides those heuristics and causes the compiler to eliminate all non-
loop control flow within the scope of the pragma. Users can specify this pragma to facilitate software
pipelining of inner loops that contain conditional code, because the compiler can only software pipeline
loops that contain certain types of control flow. When placed within the scope of an inner loop, this
pragma causes the compiler to eliminate all branches except for the loop back branch.
+O[no]loop_unroll[=n] (default +Oloop_unroll)
#pragma UNROLL_FACTOR n
#pragma UNROLL n | (n)
The option indicates how many times the optimizer should attempt to unroll each loop. In most cases,
this will only affect innermost loops. Similarly, the block-scoped UNROLL_FACTOR and UNROLL
pragmas specify that the particular innermost loop should be unrolled n times. The
UNROLL_FACTOR pragma must be placed inside the associated loop, whereas the UNROLL pragma
can be placed just before the specified loop. By default the compiler uses heuristics to determine the
best unroll factor for an inner loop. However, if the user knows that a particular unroll factor is best for
the given loop, or alternatively, that no unrolling should be applied to the loop, the option or pragma
can be used to communicate this information to the compiler. The user specified unroll factor overrides
the unroll factor computed by the compiler. Specifying n=1 prevents the compiler from unrolling the
loop. Specifying n=0 causes the compiler to use its own heuristics to determine the best unroll factor
(same as not specifying the option or pragma). The pragma is ignored if it decorates a non-innermost
loop.
+integer_overflow=[ moderate|conservative] (default
+Ointeger_overflow=moderate)
Specifies how aggressive the optimizer should be in assuming that integer arithmetic computations do
not overflow. According to C and C++ language standards, signed integer arithmetic overflow in user
code results in undefined behavior. Therefore, by default (under
+Ointeger_overflow=moderate), the compiler assumes that such overflow will not occur. As a
result, the compiler may remove sign extensions of signed integer accumulations within loop bodies,
which enables further analysis and optimizations. Applications that rely on particular signed integer
overflow behaviour should use +Ointeger_overflow=conservative.
+Oautopar