Register resource allocation feedback
First Claim
1. In a computer system a method for allocating registers while generating code into a set of instructions executed by said computer system said method comprising the steps of:
- generating a snapshot of the current state of said generating of said code, said snapshot providing sufficient information to proceed with said generating of said code from the point where said snapshot was generated;
generating a first set of code optimizations;
determining whether said first set of code optimizations meets efficiency criteria; and
if determining said first set of code optimizations does not meet said efficiency criteria, then proceeding with said generating of said code without incorporating said first set of code optimizations based on said snapshot.
2 Assignments
0 Petitions
Accused Products
Abstract
Techniques for allocating registers when generating code is described. A snapshot is generated when generating code. The snapshot contains sufficient information to restore the state of generating code that existed at the point when the snapshot was generated so that the generation of code can proceed from that point. A first set of code optimizations is generated. In response to determining that the first set of code optimizations fails to meet efficiency criteria, the generation of code proceeds based on the snapshot without incorporating the first set of code optimizations. Feedback is generated by analyzing the allocation of registers based on the first set of code optimizations. A second set of code optimizations is based on the feedback. Feedback includes information such as the number of spills occurring based on the first set of code optimizations. In addition, an allocation of registers based on a second set of code optimizations is performed in parallel with an allocation of registers based on the first set of code optimizations. Generation of code proceeds based on the second set of code optimizations when the second set of code optimizations causes less spilling the first set of code optimizations.
-
Citations
16 Claims
-
1. In a computer system a method for allocating registers while generating code into a set of instructions executed by said computer system said method comprising the steps of:
-
generating a snapshot of the current state of said generating of said code, said snapshot providing sufficient information to proceed with said generating of said code from the point where said snapshot was generated; generating a first set of code optimizations; determining whether said first set of code optimizations meets efficiency criteria; and if determining said first set of code optimizations does not meet said efficiency criteria, then proceeding with said generating of said code without incorporating said first set of code optimizations based on said snapshot. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer program embodied in a computer-readable medium for minimizing spilling when allocating registers while generating code, said computer program comprising:
-
a first code segment for generating a snapshot of the current state of said generating of said code, said snapshot providing sufficient information to proceed with said generating of said code from the point where said snapshot was generated; a first code segment for generating a first set of code optimizations; a second code segment for determining whether said first set of code optimizations meets efficiency criteria; and a third code segment for proceeding with said generating of said code without incorporating said first set of code optimizations based on said snapshot if determining said first set of code optimizations does not meet said efficiency criteria. - View Dependent Claims (10, 11)
-
-
12. A computer system comprising:
-
a memory; a processor coupled to said memory; a code generator stored in said memory for execution by said processor; said code generator being adapted to generate a snapshot of the current state of said generating of said code, said snapshot providing sufficient information to proceed with said generating of said code from the point where said snapshot was generated; said code generator being adapted to generate a first set of code optimizations; said code generator being adapted to determine whether said first set of code optimizations meets efficiency criteria; and said code generator being adapted to proceed with said generating of said code without incorporating said first set of code optimizations based on said snapshot when determining said first set of code optimizations does not meet said efficiency criteria. - View Dependent Claims (13)
-
-
14. A computer data signal embodied in a carrier wave representing a computer program for minimizing spilling when allocating registers while generating code, said computer program comprising:
-
a first code segment for generating a snapshot of the current state of said generating of said code, said snapshot providing sufficient information to proceed with said generating of said code from the point where said snapshot was generated; a first code segment for generating a first set of code optimizations; a second code segment for determining whether said first set of code optimizations meets efficiency criteria; and a third code segment for proceeding with said generating of said code without incorporating said first set of code optimizations based on said snapshot if determining said first set of code optimizations does not meet said efficiency criteria. - View Dependent Claims (15, 16)
-
Specification