摘要 |
PROBLEM TO BE SOLVED: To shorten compilation times by decreasing the number of variables to be allocated by substituting variable which are defined at the same time with another certain variable, regarding the substitutive variable as an object of register allocation. SOLUTION: In a compiler 10, a register allocation part 203 inputs an intermediate code 40 for the generation of a variable information table and generates the variable information table for storing reference point information, etc., on respective variables. To replace variable which are defined at a definition points at the same time with another certain variable, a substitution table is generated. When registers are searched, the variable information table allocates the registers to the generated variables, while checking the reference point information, etc. When a reference point is converted, a variable table substitute the reference by a register for reference by a variable to which the register is allocated for the generated variable. For a variable to which no register is allocated, the reference by the variable is replaced with reference from a memory.
|