Patent ID: 7305665

Claim:
A computer apparatus having a storage medium, for compiling a source program comprising: a simultaneously used variable acquisition means, said apparatus converts a source program into instructions for a processor, said simultaneously used variable acquisition means obtains, with respect to each of a plurality of variables used in the source program, one or more other variables used simultaneously with the variable; an allocation sequence generation means which generates a plurality of allocation sequences between a plurality of variables to allocate each variable to one of the plurality of registers different from registers to which said one or more other variables used simultaneously with said each variable are allocated; an allocation priority acquisition means which obtains allocation priorities indicating to which one register from the plurality of registers each variable is allocated with priority, the allocation priorities obtained at least from using variable combination information including at least information indicating relationship between the plurality of variables, information on loop portion of the source program and execution record information; and a register allocation means which allocates the plurality of variables to registers in accordance with one of the allocation sequences selected on the basis of allocation priorities.