harpoon.Analysis.Quads
Class QuadLiveness

java.lang.Object
  extended by harpoon.Analysis.Liveness<Quad>
      extended by harpoon.Analysis.Quads.QuadLiveness

public class QuadLiveness
extends Liveness<Quad>

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.4 2004/02/08 01:53:14 cananian Exp $
Author:
Karen K. Zee <kkz@alum.mit.edu>

Field Summary
 
Fields inherited from class harpoon.Analysis.Liveness
hc
 
Constructor Summary
QuadLiveness(HCode<Quad> hc)
          Creates a QuadLiveness.
 
Method Summary
 Set<Temp> getLiveIn(Quad hce)
          Returns the Set of Temps that are live-in at the HCodeElement.
 Temp[] getLiveInandOutArray(Quad hce)
           
 Temp[] getLiveInArray(Quad hce)
          Same as getLiveIn, but returns array of Temps.
 Set<Temp> getLiveOut(Quad hce)
          Returns the Set of Temps that are live-out at the HCodeElement.
 Temp[] getLiveOutArray(Quad 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<Quad> hc)
Creates a QuadLiveness. Requires that the HCode be quad-no-ssa.

Method Detail

getLiveIn

public Set<Temp> getLiveIn(Quad 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<Quad>

getLiveInArray

public Temp[] getLiveInArray(Quad 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<Temp> getLiveOut(Quad 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<Quad>

getLiveOutArray

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


getLiveInandOutArray

public Temp[] getLiveInandOutArray(Quad hce)