15.1.11 UNROLL Directive

The UNROLL directive tells the compiler's optimizer how many times to unroll a DO loop. This directive can only be applied to iterative DO loops.

The UNROLL takes the following form:

cDEC$ UNROLL [(n)]

c
Is one of the following: C (or c), !, or * (see Section 15.1.1).


n
Is an integer constant. The range of n is 0 through 255.

Rules and Behavior

The UNROLL directive must precede the DO statement for each DO loop it affects. No source code lines, other than the following, can be placed between the UNROLL directive statement and the DO statement:

If n is specified, the optimizer unrolls the loop n times. If n is omitted, or if it is outside the allowed range, the optimizer picks the number of times to unroll the loop.

The UNROLL directive overrides any setting of loop unrolling from the command line.

For More Information:

For details on syntax rules for all general directives, see Section 15.1.1.


Previous Page Next Page Table of Contents