System and method for improved register allocation in an optimizing compiler
First Claim
1. A method for improving register allocation in an optimizing compiler, comprising:
- identifying a plurality of variables having a lifetime that exceeds an initiation interval of a present source code programming loop of interest;
allocating a rotating register for each of the identified plurality of variables;
assigning one of the plurality of variables to a respective rotating register when the variable was initiated within the source code programming loop; and
communicating rotating register usage to a scalar register allocator, wherein the scalar register allocator assigns variables outside of the source code programming loop to an allocated but unassigned rotating register.
3 Assignments
0 Petitions
Accused Products
Abstract
Systems and methods for improving an optimizing compiler are disclosed. A representative compiler, includes: a translation engine and a low-level instruction optimizer, the low-level instruction optimizer further includes a scheduler and register allocator, the scheduler and register allocator comprising: a minimum initiation interval determiner; a modulo scheduler; a rotating register allocator configured to receive a schedule, allocate and assign rotating registers responsive to modulo schedule, and communicate a status of a set of rotating registers; a static register allocator configured to receive the schedule, allocate and assign scalar variables to a set of scalar registers responsive to the modulo schedule and the status; and a rotating register spiller configured to receive and store interfering variables in a memory. A representative method includes the following steps: identifying a plurality of variables having a lifetime that exceeds an initiation interval; allocating a rotating register for each of the identified plurality of variables; assigning one of the plurality of variables to a respective rotating register when the variable was initiated within the source code programming loop; and communicating rotating register usage to a scalar register allocator, wherein the scalar register allocator assigns variables outside of the source code programming loop to an allocated but unassigned rotating register.
-
Citations
27 Claims
-
1. A method for improving register allocation in an optimizing compiler, comprising:
-
identifying a plurality of variables having a lifetime that exceeds an initiation interval of a present source code programming loop of interest;
allocating a rotating register for each of the identified plurality of variables;
assigning one of the plurality of variables to a respective rotating register when the variable was initiated within the source code programming loop; and
communicating rotating register usage to a scalar register allocator, wherein the scalar register allocator assigns variables outside of the source code programming loop to an allocated but unassigned rotating register. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer-readable medium having a program for improving register allocation in an optimizing compiler, the program comprising:
-
logic configured to receive a representation of a source code program loop;
logic configured to identify live ranges of variables used within the source code program loop that exceed an initiation interval of the source code program loop;
logic configured to allocate rotating registers for each of the variables;
logic configured to assign values for each of the variables that are initiated within the source code program loop; and
logic configured to communicate with a scalar register allocator responsive to the logic configured to allocate rotating registers and the logic configured to assign values. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A compiler, comprising:
-
means for receiving a schedule representation of a source code loop;
means for identifying live ranges of variables within the schedule representation;
means for classifying the variables responsive to when each respective variable is defined;
means for managing a plurality of rotating registers responsive to the means for classifying; and
means for communicating rotating register usage information responsive to the means for managing. - View Dependent Claims (18, 19, 20)
-
-
21. An optimizing compiler, comprising:
-
a translation engine configured to receive source code and generate an intermediate representation of a source code programming loop; and
a low-level instruction optimizer, the low-level instruction optimizer further comprising a scheduler and register allocator, the scheduler and register allocator comprising;
an initiation interval determiner configured to identify where in the source code each of a plurality of variables is identified and when variables are defined within a programming loop, in which of a plurality of programming loops each respective variable is defined;
a modulo scheduler configured to receive the intermediate representation and generate a schedule responsive to the source code programming loop;
a rotating register allocator configured to receive the schedule, allocate and assign rotating registers responsive to the schedule and initiation interval, and communicate a status of a set of rotating registers;
a static register allocator configured to receive the schedule, allocate and assign scalar variables to a set of scalar registers responsive to the initiation interval determiner and the status; and
a rotating register spiller configured to receive and store interfering variables in a memory. - View Dependent Claims (22, 23, 24, 25, 26, 27)
-
Specification