Claims Analysis
Total Claims: 12
Claim 1
Independent Claim
263 words
In a computer system comprising a CPU and a plurality of registers coupled to said CPU for executing a high Level language compiler and program routines compiled by said compiler, a method for said compiler to allocate registers for a program routine during code generation while compiling said program routine, said method comprising the steps of: a) decomposing said program routine into regions, said regions comprising non-overlapping basic blocks of said program routine, said regions having three distinct types, a Subsume type, a Join type and a Merge type, said Subsume type regions being regions comprising inner and outer loops of said program routine, said Join type regions being regions comprising parts of conditional statements of said program routine, said Merge type regions being regions comprising a selected one of (i) parts of a basic block, and (ii) independent loops, of said program routine; b) constructing interference graphs of said regions individually, said interference graphs comprising nodes representing variables and edges connecting said nodes representing conflicts between said nodes, two nodes are connected by an edge if the two variables represented by nodes cannot simultaneously share a register at some point in the program routine; c) coloring the interference graphs of said regions d) connecting said colored interference graphs of said regions, each pair of said interference graphs being connected at colored nodes that are live over region boundaries of said regions; and e) repeating steps (c) and (d) until a composite interference graph representing the entire routine is connected and colored f) allocating registers to colored nodes of said composite interference graph.
Claim 2
Dependent Claim
263 words
In a computer system comprising a CPU and a plurality of registers coupled to said CPU for executing a high Level language compiler and program routines compiled by said compiler, a method for said compiler to allocate registers for a program routine during code generation while compiling said program routine, said method comprising the steps of: a) decomposing said program routine into regions, said regions comprising non-overlapping basic blocks of said program routine, said regions having three distinct types, a Subsume type, a Join type and a Merge type, said Subsume type regions being regions comprising inner and outer loops of said program routine, said Join type regions being regions comprising parts of conditional statements of said program routine, said Merge type regions being regions comprising a selected one of (i) parts of a basic block, and (ii) independent loops, of said program routine; b) constructing interference graphs of said regions individually, said interference graphs comprising nodes representing variables and edges connecting said nodes representing conflicts between said nodes, two nodes are connected by an edge if the two variables represented by nodes cannot simultaneously share a register at some point in the program routine; c) coloring the interference graphs of said regions d) connecting said colored interference graphs of said regions, each pair of said interference graphs being connected at colored nodes that are live over region boundaries of said regions; and e) repeating steps (c) and (d) until a composite interference graph representing the entire routine is connected and colored f) allocating registers to colored nodes of said composite interference graph.
Claim 3
Dependent Claim
25 words
The method as set forth in claim 1, wherein, said program routine is decomposed into regions in said step a) using a hierarchical reduction algorithm.
Claim 4
Dependent Claim
86 words
The method as set forth in claim 1, wherein, said program routine comprises a plurality of nested control flow levels; said steps b) and c) being repeated for each of said nested control flow level starting with the inner most control flow level to the outer most control flow level, each of said control flow level, except the outer most control flow level, collapsing into a region of the next outer control flow level when its regions' colored interference graphs are connected in said step c).
Claim 5
Dependent Claim
95 words
The method as set forth in claim 3, wherein, if connecting said interference graphs at said live colored nodes renders said connected interference graph uncolorable, said interference, graphs are connected as follows: if a live colored node is referenced in both regions, said interference graphs are connected by adding a register to register move to avoid a register spill at said live colored node; and if a live colored node is not referenced in both regions, said interference graphs of said regions are connected by adding a register spill into memory at said colored node.
Claim 6
Dependent Claim
113 words
The method as set forth in claim 3, wherein, said computer system comprises a plurality of parallel processors; said regions comprise regions of at least two types, a Join type and a Merge type, said Join type regions being regions comprising parts of conditional statements of said program routine, said Merge type regions being regions comprising a selected one of (i) parts of a basic block, and (ii) independent loops, of said program routine; and said interference graphs of said regions having a region type of a selected one of said Merge and said Join type are colored individually in parallel, regardless which control flow levels said Merge and Join regions are located.
Claim 7
Dependent Claim
267 words
In a computer system comprising a central processing unit (CPU) and a plurality of registers coupled to said CPU for executing a high level language compiler and program routines compiled by said compiler, a code generator of said compiler for allocating registers for a program routine during code generation while compiling said program routine, said code generator comprising: a) decomposing means for decomposing said program routine into regions, said regions comprising non-overlapping basic blocks of said program routine, said regions having three distinct types, a Subsume type, a Join type and a Merge type, said Subsume type regions being regions comprising inner and outer loops of said program routine, said Join type regions being regions comprising parts of conditional statements of said program routine, said Merge type regions being regions comprising a selected one of (i) parts of a basic block, and (ii) independent loops, of said program routine; b) coloring means coupled to said decomposing means for constructing and coloring interference graphs of said regions individually, said interference graphs comprising nodes representing variables, and edges connecting said nodes representing conflicts between said registers, wherein two nodes are connected by an edge if the two variables represented by nodes cannot simultaneously share a register during execution of the program routine; c) connecting means coupled to said coloring means for connecting said colored interference graphs of said regions, each pair of said interference graphs being connected at colored nodes that are live over region boundaries of said regions; and d) allocating means coupled to said connecting means for allocating registers to colored nodes of said connected interference graphs.
Claim 8
Dependent Claim
267 words
In a computer system comprising a central processing unit (CPU) and a plurality of registers coupled to said CPU for executing a high level language compiler and program routines compiled by said compiler, a code generator of said compiler for allocating registers for a program routine during code generation while compiling said program routine, said code generator comprising: a) decomposing means for decomposing said program routine into regions, said regions comprising non-overlapping basic blocks of said program routine, said regions having three distinct types, a Subsume type, a Join type and a Merge type, said Subsume type regions being regions comprising inner and outer loops of said program routine, said Join type regions being regions comprising parts of conditional statements of said program routine, said Merge type regions being regions comprising a selected one of (i) parts of a basic block, and (ii) independent loops, of said program routine; b) coloring means coupled to said decomposing means for constructing and coloring interference graphs of said regions individually, said interference graphs comprising nodes representing variables, and edges connecting said nodes representing conflicts between said registers, wherein two nodes are connected by an edge if the two variables represented by nodes cannot simultaneously share a register during execution of the program routine; c) connecting means coupled to said coloring means for connecting said colored interference graphs of said regions, each pair of said interference graphs being connected at colored nodes that are live over region boundaries of said regions; and d) allocating means coupled to said connecting means for allocating registers to colored nodes of said connected interference graphs.
Claim 9
Dependent Claim
24 words
The code generator as set forth in claim 6, wherein, said decomposing means decomposes said program routine into regions using an hierarchical reduction algorithm.
Claim 10
Dependent Claim
87 words
The code generator as set forth in claim 6, wherein, said program routine comprises a plurality of nested control flow levels; said coloring and connecting means repeats said coloring and said connecting for each of said nested control flow level starting with the inner most control flow level to the outer most control flow level, each of said control flow level, except the outer most control flow level, collapsing into a region of the next outer control flow level when its regions' colored interference graphs are connected.
Claim 11
Dependent Claim
104 words
The code generator as set forth in claim 8, wherein, if connecting said interference graphs at said live colored nodes render said connected interference graph uncolorable, said coloring and connecting means connects and colors said interference graphs as follows: if a live colored node is referenced in both regions, said connecting means connects said interference graphs by adding a register to register move to avoid a register spill at said live colored node; and if a live colored node is not referenced in both regions, said connecting means connects said interference graphs by adding a register spill into memory at said live colored node.
Claim 12
Dependent Claim
115 words
The code generator as set forth in claim 8, wherein, said computer system comprises a plurality of parallel processors; said regions comprise regions of at least two types, a Join type and a Merge type, said Join type regions being regions comprising parts of conditional statements of said program routine, said Merge type regions being regions comprising a selected one of (i) parts of a basic block, and (ii) independent loops, of said program routine; and said coloring means colors said interference graphs of said regions having a region type of a selected one of said Merge and said Join type in parallel, regardless which control flow levels said Merge and Join regions are located.