×

Register allocation method and apparatus for gernerating spill code as a function of register pressure compared to dual thresholds

  • US 5,946,491 A
  • Filed: 06/06/1996
  • Issued: 08/31/1999
  • Est. Priority Date: 06/06/1996
  • Status: Expired due to Fees
First Claim
Patent Images

1. A computer apparatus comprising:

  • (A) a processor having a plurality of registers, the processor executing a first instruction stream and in response to the first instruction stream, the processor operates on information stored in the plurality of registers;

    (B) a compiler for generating the first instruction stream from a second instruction stream, the second instruction stream having a plurality of variables, the compiler including;

    a spill code generator, the spill code generator including;

    a register pressure indicator, the register pressure indicator indicating the register pressure at a plurality of regions within the second instruction stream;

    a load instruction inserter;

    a store instruction inserter;

    the load instruction inserter inserting at least one memory load instruction into the second instruction stream and the store instruction inserter inserting at least one memory store instruction into the second instruction stream at locations that reduce register pressure in at least one of the plurality of regions where the register pressure indicator indicates that the register pressure exceeds a first predetermined threshold level;

    the load instruction inserter and the store instruction inserter avoiding the insertion of memory load instructions and memory store instructions at locations that reduce register pressure in at least one of the plurality of regions where the register pressure indicator indicates that the register pressure is less than the first predetermined threshold level;

    wherein the load instruction inserter and the store instruction inserter avoid the insertion of memory load instructions and memory store instructions at locations that reduce register pressure only in at least one of the plurality of regions where the register pressure indicator indicates that the register pressure is less than a second predetermined threshold level.

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