Loop Unrolling with -unroll[n]

Use -unroll[n] to specify the maximum number of times you want to unroll a loop. The following example unrolls a loop at most four times:

prompt>ifc -unroll4 a.f

To disable loop unrolling, specify n as 0. The following example disables loop unrolling:

prompt>ifc -unroll0 a.f

Omit n to let the compiler decide whether to perform unrolling or not. Use n = 0 to disable unroller.

Itanium compiler currently uses only -unroll0 (n = 0); all other values are NOPs.

Benefits and Limitations of Loop Unrolling

The benefits are:

The potential costs are:

For more information on how to optimize with -unroll[n], refer to Intel® Pentium® 4 Porcessor Optimization Reference Manual.