Scalar Optimization Options

Details the options for scalar optimization.

-h [no]interchange, -O [no]interchange

Default: interchange

This option allows the compiler to attempt to interchange all loops - a technique that is used to improve performance by having the compiler swap an inner loop with an outer loop. The compiler attempts the interchange only if the interchange will increase performance. Loop interchange is performed only at scalar optimization level 2 or higher.

To disable interchange of loops individually, use the nointerchange directive prior to the loop.

nointerchange inhibits the compiler's attempts to interchange loops.

Specifying the nointerchange option is equivalent to specifying a NOINTERCHANGE directive prior to every loop. To disable loop interchange on individual loops, use the NOINTERCHANGE directive.

-h scalarn, -O scalarn

Default: scalar2

Specifies the level of automatic scalar optimization to be performed. Scalar optimization directives are unaffected by this option. The values for n are:
0
Minimal automatic scalar optimization. Implies -h zeroinc.
1
Conservative automatic scalar optimization. Implies -h nozeroinc.
2
Aggressive automatic scalar optimization. The scalar optimizations that provide the best application performance are used, with some limitations imposed to allow for faster compilation times.
3
Very aggressive optimization; compilation times may increase significantly.

-h [no]zeroinc , -O [no]zeroinc

Default: -h nozeroinc

The -h nozeroinc option improves run time performance by causing the compiler to assume that constant increment variables (CIVs) in loops are not incremented by expressions with a value of 0.

It is identical to the -O [no]zeroinc option.

The -h zeroinc option causes the compiler to assume that some constant increment variables (CIVs) in loops might be incremented by 0 for each pass through the loop, preventing generation of optimized code.

-h zeroinc can cause less strength reduction to occur in loops that have variable increments.

A CIV is a variable that is incremented only by a loop invariant value. For example, in a loop with variable J, the statement J = J + K, where K can be equal to zero, J is a CIV.