×

Register allocation methods having upward pass for determining and propagating variable usage information and downward pass for binding; both passes utilizing interference graphs via coloring

  • US 5,530,866 A
  • Filed: 10/13/1994
  • Issued: 06/25/1996
  • Est. Priority Date: 07/30/1991
  • Status: Expired due to Term
First Claim
Patent Images

1. A computer-implemented method for allocating variables among physical registers of a target computer during conversion of a higher level code portion to a form readable by the target computer, comprising the steps of:

  • generating a hierarchical tile tree corresponding to an underlying control structure of the code portion and including a root tile having a first code block with no predecessor and a second code block with no successor and a set of basic tiles corresponding to at least one of loop control structures and conditional control structures, the root tile being hierarchically superior to the basic tiles and at least a first one of the basic tiles being hierarchically superior to at least a second one of the basic tiles;

    determining variable usage within the tiles beginning with hierarchically inferior tiles and proceeding to hierarchically superior tiles, the variable usage for hierarchically superior tiles including summary variable usage of hierarchically inferior tiles;

    assigning variables to a number of pseudo registers based upon the variable usage within the tile for each tile, the number of pseudo registers being limited by the number of physical registers;

    determining variable usage within the code section for each tile beginning with hierarchically superior tiles and proceeding to hierarchically inferior tiles, the variable usage for hierarchically inferior tiles including variable usage of hierarchically superior tiles; and

    binding the pseudo registers to the physical registers such that conflicts between variables used within a tile and variables used in the code section outside of the tile are resolved to reduce variable usage costs within the entire code section.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×