5.3.9 C*$* unroll( <#it>[<weight>])

The C*$* unroll directive tells KAP how to unroll, that is, replicate the text of, innermost loops. Outer loop unrolling is part of memory management.

The loops are unrolled according to a formula that counts the number of array references and arithmetic operations in the loop. KAP unrolls the loop until that value equals the <weight> parameter or the number of unrolled iterations reaches the <#it> parameter. The /unroll and /unroll2 command qualifiers act like a global C*$* unroll directive.


Note
The /scalaropt level must be set at 2 or higher for this directive to be enabled.

The <#it> parameter is the maximum number of iterations to unroll. The =0 parameter uses default values to unroll. The =1 parameter means no unrolling. <weight> is the maximum weight in an unrolled loop. <weight> is estimated by counting operands and operators in a loop.

A scalar loop is unrolled until one of the limits is reached. See Chapter 4 and Chapter 8 for detailed examples.

The C*$* unroll directive is valid only for the loop before which it appears.


Previous Page | Next Page | Contents | Index |
Command-Line Qualifiers