Integrated register allocator in a compiler
First Claim
1. A method of allocating registers when compiling source code, said method comprising steps of:
- translating source code to intermediate code;
identifying an operand from said intermediate code to store in a real register; and
selecting a class of real registers operable to store said operand.
2 Assignments
0 Petitions
Accused Products
Abstract
A compiler includes a real register allocation stage, an optimization stage and a final code stage. The real register allocation stage is configured to generate intermediate code from a basic block of source code. Physical registers, instead of virtual registers, are allocated to operands from the generated intermediate code, and the operands are stored in the physical registers. Then, the intermediate code is optimized, and machine readable code is generated from the intermediated code using the optimized registers in the final code stage. By allocating physical registers in the front-end of the compiler, instead of just prior to generating the machine-readable code, compiling time and memory needed for compiling source code is reduced.
33 Citations
31 Claims
-
1. A method of allocating registers when compiling source code, said method comprising steps of:
-
translating source code to intermediate code;
identifying an operand from said intermediate code to store in a real register; and
selecting a class of real registers operable to store said operand. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. A method of compiling source code comprising steps of:
-
generating intermediate code from a portion of source code;
allocating a plurality of real registers to store a plurality of operands from said intermediate code while generating the intermediate code; and
generating machine-readable code from said intermediate code using said plurality of real registers. - View Dependent Claims (19, 20, 21, 22, 23, 24)
-
-
25. A compiler configured to compile source code into machine-readable code, said compiler comprising:
-
a register allocation stage configured to generate intermediate code from said source code and configured to allocate a plurality of real registers to a plurality of operands from said intermediate code;
an optimization stage configured to optimize said intermediate code; and
a final code stage configured to generate said machine-readable code from said intermediate code using said plurality real registers. - View Dependent Claims (26, 27, 28, 29, 30, 31)
-
Specification