×

Register allocation system adaptive for pipelining

  • US 5,261,062 A
  • Filed: 10/31/1990
  • Issued: 11/09/1993
  • Est. Priority Date: 11/08/1989
  • Status: Expired due to Term
First Claim
Patent Images

1. In a computer implemented compiler, for use in a pipelined parallel processing system having a plurality of real registers, a method for allocating virtual registers associated with sequential instructions of a program to respective real registers of the system, wherein the method comprises:

  • determining an occupational state for the virtual registers;

    performing a live analysis to determine a living period for each of the virtual registers;

    determining if the living period of any virtual register overlaps with the living period of any other virtual register indicating an interference;

    determining, for each of the respective virtual registers, if the number of interferences exceeds the number of real registers in the system;

    if the number of interferences for the virtual register is less than the number of real registers in the system, then eliminating each such virtual register from further interference processing;

    if the number of interferences for the virtual register is not less than the number of real registers in the system, then for each such remaining virtual register, reducing the living period of the virtual register by inserting a spill code instructing the saving of the contents of the virtual register to memory, inserting a return instruction, and proceeding to the step of determining an occupational state for the virtual registers to continue the processing with the remaining virtual registers; and

    when the number of interferences for each virtual register is less than the number of real registers in the system, then allocating the virtual registers to respective real registers, wherein the allocating of the virtual registers to respective real registers comprises;

    selecting the virtual register;

    selecting a proposed real register;

    determining whether allocation of the selected virtual register to the proposed real register is possible;

    if allocation of the selected virtual register to the proposed real register is possible, then allocating the virtual register to the proposed real register;

    if allocation of the selected virtual register to the proposed real register is not possible, then selecting another real register as the proposed real register and returning to the step of determining whether allocation of the selected virtual register to the proposed real register is possible;

    determining if there are any more virtual registers unallocated;

    if there are any more virtual registers unallocated, then returning to the step of selecting the virtual register and repeating the allocating of virtual registers to respective real registers until completed.

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