摘要 |
PROBLEM TO BE SOLVED: To generate an object program for a vector processor of high execution efficiency without limitation even in a double loop in which the number of repeated loops is smaller than the maximum vector length. SOLUTION: When the number N of an inner loop repeated in a source program having a double loop of an outer loop and an inner loop is half or smaller than the maximum vector length VL of the source program in a compiler, the double loop is converted by a loop conversion part 23 into a loop in which a vector operation to operate N elements is a loop body, and the number of repetitions is a remainder obtained by dividing the number M of the repeated outer loops by the smaller of a value VL/N, or M, and a loop in which a vector operation to operate an element of a value obtained by multiplying a smaller of the value VL/N, or M, by N is a loop body, and the number of repetitions is a value obtained by dividing M by the smaller of a value VL/N, or M. COPYRIGHT: (C)2009,JPO&INPIT
|