Loop optimization method and a compiler
AssigneeHitachi, Ltd.
InventorsKenichi Miyata, Keiko Motokawa
Life of this patent
Estimating the term…
Loading patent…
AssigneeHitachi, Ltd.
InventorsKenichi Miyata, Keiko Motokawa
Estimating the term…
The present invention provides a loop optimization method and a compiler suitable for improving the execution time of a loop including assumed-shape array. A loop optimizer detects the outermost loop included in a subroutine, then traverse every statements in the outermost loop (including any inner nested loops) to detect array reference to the assumed-shape arrays to register thus detected assumed-shape arrays to the assumed-shape array table. Then for thus registered assumed-shape arrays, the optimizer generates a conditional expression determining whether the first order dimension stride of each array is 1 or not, to form a conditional statement by concatenating the conditional expressions of every elements registered to the assumed-shape array table with the conditional “AND” and then duplicates the loop by copying the outer loop and the loop body entirely in focus at that time to the part to be executed when the condition is TRUE and to the part to be executed when the condition is FALSE.
A loop optimization method executed by a compiler, comprising the following steps of:
A compiler performing a loop optimization method, comprising the following steps of:
A computer-readable recording medium, storing a program executing a loop optimization method by a compiler, said method comprises the following steps of:
Dependencies are inferred from the claim text.