摘要 |
PROBLEM TO BE SOLVED: To provide a code generation method and a compiler which can efficiently arrange data in a program on a computer provided with an on-chip memory having a function for changing memory capacity to be allocated according to a program and a built-in memory such as a cache memory. SOLUTION: The code generation method comprises: phase dividing processing S105 for extracting each phase composed of a loop in a program as a unit and reference data to be referred to in each phase and dividing the program; data mapping processing S106 for calculating capacity for distributing memory capacity required for the reference data divided by the phase division processing S105 to the cache memory; and the on-chip memory and code generation processing S107 for generating an instruction code for changing distribution capacity to the cache memory and the on-chip memory on a switching point of phases of the program on the basis of the memory capacity calculated by the data mapping processing S106. COPYRIGHT: (C)2008,JPO&INPIT |