摘要 |
PROBLEM TO BE SOLVED: To provide a variable-optimizing device that performs loop fusion even if the number of times of looping is defined by using different variables or expressions. SOLUTION: A declaration information/array expression detecting means 21 inputs an intermediate code 32 and detects array declaration information and an array expression in a source program 31 to register them with a declaration information table and an array expression table 33. A reference array detecting means 22 refers to the declaration information table and the array expression table 33 to examine arrays to be referred to in an array expression, and then registers the kinds of the respective arrays and shapes expressed by lower limits/upper limits with a reference array table. A variable relation determination means 23 makes variables, which define the lower limits/upper limits, constant, or determines relational expressions between the variables by using the fact that the sizes of the respective dimensions of the arrays to be referred to in the same array expression are the same. A variable substitution means 25 substitutes the variables included in the intermediate code with the values which are made constant or the determined relational expressions. COPYRIGHT: (C)2009,JPO&INPIT
|