Loop Unrolling with -unroll[n]

The -unroll[n] option is used in the following way:

ifort -unroll4 a.f

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

ifort -unroll0 a.f

Itanium® compiler currently uses only n = 0; any other value is NOP.

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 and Intel® Xeon(TM) Processor Optimization Reference Manual.