×

Register allocation method and apparatus for truncating runaway lifetimes of program variables in a computer system

  • US 5,761,514 A
  • Filed: 08/31/1995
  • Issued: 06/02/1998
  • Est. Priority Date: 08/31/1995
  • Status: Expired due to Fees
First Claim
Patent Images

1. A computer apparatus comprising:

  • (A) a central processing unit having a plurality of registers, the central processing unit executing a first instruction stream and in response to the first instruction stream, the central processing unit 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 liveness calculator for determining for each of the plurality of variables a first span of the second instruction stream for which a selected one of the plurality of variables is live, wherein the selected variable is live at a first given point in the second instruction stream if the second instruction stream contains along some forward path from the first given point a first instruction that uses the selected variable before encountering a second instruction that defines the selected variable, and wherein the first span defines a lifetime for the selected variable;

    a runaway lifetime detector for determining whether at least one of the plurality of variables is live in at least one predetermined location within the second instruction stream, wherein a variable that is live at the predetermined location has a runaway lifetime; and

    a runaway lifetime truncator for inserting a third instruction into the second instruction stream to eliminate at least one runaway lifetime.

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