Patent ID: 6035125
Filing Date: 2000-03-07
Classification: G06F

Abstract:
A method of performing a loop unrolling transformation specified by loop unrolling factors UF[1], . . . , UF[k] on a perfect nest of k multiple loops 1, . . . , k, wherein UK[j] is an unrolling factor corresponding to loop j, to produce an unrolled loop representation, said method comprising the steps of:moving from an outermost loop 1 to an innermost loop k of the nest, examining an unroll factor UF[j] of a current loop j;expanding a separate unrolled loop body by the specified unroll factor UF[j];adjusting a loop header for the current loop j, further comprising:adjusting the loop header to be an assignment of an index variable to a lower-bound expression if an iteration count of the current loop, COUNT[j], is less than or equal to the unroll factor of the current loop, UF[j]; andadjusting the loop header so that the iteration count of the current loop j equals a rounded down truncation of a result of dividing the iteration count of the current loop by the unroll factor of the current loop, .left brkt-bot.COUNT[j]/UF[j].right brkt-bot., if the iteration count of the current loop, COUNT[j], is not less than or equal to the unroll factor of the current loop, UF[j]; andgenerating a remainder loop nest if the remainder loop nest is needed to complete the unrolled loop representation.