Minimizing Register Spills by Using Register Moves
First Claim
1. A compiler comprising:
- first instructions configured to generate code; and
second instructions configured to;
detect a plurality of spilled variables corresponding to program instructions of a computer program; and
identify an available register for storing a first spilled variable of the plurality of spilled variables;
wherein in response to identifying said available register, the first instructions are configured to modify the program instructions to allocate the first spilled variable to the available register.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method for minimizing register spills during compilation. A compiler reallocates spilled variables from stack memory to other available registers. Although a corresponding register file may not have available registers for storage, the compiler identifies available registers in other locations for storage. The compiler identifies available registers in an alternate register file, wherein the alternate register file may be a floating-point register file which is then used for spilled integer variables. Other instruction type combinations between spilled variables and alternate register files are possible. When an available register within the alternate register file is identified, the compiler modifies the program instructions to allocate the corresponding spilled variable to the available register.
42 Citations
20 Claims
-
1. A compiler comprising:
-
first instructions configured to generate code; and second instructions configured to; detect a plurality of spilled variables corresponding to program instructions of a computer program; and identify an available register for storing a first spilled variable of the plurality of spilled variables; wherein in response to identifying said available register, the first instructions are configured to modify the program instructions to allocate the first spilled variable to the available register. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer implemented method comprising:
-
detecting by the computer a plurality of spilled variables corresponding to program instructions of a computer program; identifying an available register for storing a first spilled variable of the plurality of spilled variables; and modifying the program instructions to allocate the first spilled variable to the available register, in response to identifying said available register. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A computer readable storage medium storing program instructions, wherein the program instructions are executable to:
-
detect a plurality of spilled variables corresponding to program instructions of a computer program; identify an available register for storing a first spilled variable of the plurality of spilled variables; and modify the program instructions to allocate the first spilled variable to the available register, in response to identifying said available register. - View Dependent Claims (18, 19, 20)
-
Specification