harpoon.Analysis.Quads
Class QuadLiveness

java.lang.Object
  |
  +--harpoon.Analysis.Liveness
        |
        +--harpoon.Analysis.Quads.QuadLiveness

public class QuadLiveness
extends Liveness

QuadLiveness performs live variable analysis for a given HCode. Since it caches results, you should create a new QuadLiveness if you have changed the HCode.

Version:
$Id: QuadLiveness.java,v 1.2 2002/02/25 20:59:23 cananian Exp $
Author:
Karen K. Zee <kkz@alum.mit.edu>

Field Summary
 
Fields inherited from class harpoon.Analysis.Liveness
hc
 
Constructor Summary
QuadLiveness(HCode hc)
          Creates a QuadLiveness.
 
Method Summary
 Set getLiveIn(HCodeElement hce)
          Returns the Set of Temps that are live-in at the HCodeElement.
 Temp[] getLiveInandOutArray(HCodeElement hce)
           
 Temp[] getLiveInArray(HCodeElement hce)
          Same as getLiveIn, but returns array of Temps.
 Set getLiveOut(HCodeElement hce)
          Returns the Set of Temps that are live-out at the HCodeElement.
 Temp[] getLiveOutArray(HCodeElement hce)
          Same as getLiveOut, but returns array of Temps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuadLiveness

public QuadLiveness(HCode hc)
Creates a QuadLiveness. Requires that the HCode be quad-no-ssa.

Method Detail

getLiveIn

public Set getLiveIn(HCodeElement hce)
Returns the Set of Temps that are live-in at the HCodeElement. Requires that the HCodeElement be in quad-no-ssa form. Returns null if there no live-in variables.

Specified by:
getLiveIn in class Liveness

getLiveInArray

public Temp[] getLiveInArray(HCodeElement hce)
Same as getLiveIn, but returns array of Temps. This array is guaranteed to have the Temp's in the same order for a given QuadLiveness object,Quad pair.


getLiveOut

public Set getLiveOut(HCodeElement hce)
Returns the Set of Temps that are live-out at the HCodeElement. Requires that the HCodeElement be in quad-no-ssa form. Returns null if there no live-in variables.

Specified by:
getLiveOut in class Liveness

getLiveOutArray

public Temp[] getLiveOutArray(HCodeElement hce)
Same as getLiveOut, but returns array of Temps. Makes the same order guarantees as getLiveInArray.


getLiveInandOutArray

public Temp[] getLiveInandOutArray(HCodeElement hce)