| java.lang.Object EDU.purdue.cs.bloat.codegen.Liveness
Liveness | public class Liveness (Code) | | Liveness represents the interference graph of the local variables contained
in a control flow graph.
When the liveness of two variables overlap each other, the two variables are
said to interfere with each other. The interference graph represents
this relationship between variables. There is an (un-directed) edge between
variables a and b in the interference graph if variable
a interferes with variable b.
|
Inner Class :class NodeInfo | |
Method Summary | |
public Collection | defs() Returns the LocalExprs (variables) that occur in the CFG. | public Iterator | intersections(VarExpr a) Returns an Iterator of LocalExprs that interfere
with a given VarExpr. | public boolean | liveAtEndOfBlock(VarExpr isLive, Block block) Should not be called. | public boolean | liveAtStartOfBlock(VarExpr isLive, Block block) Should not be called. | public boolean | liveAtUse(VarExpr isLive, VarExpr at, boolean after) Should not be called. | void | liveOut(BitSet m, List[] nodes, Block block, int nodeIndex, IGNode defNode, Collection phiCatchNodes) Computes (a portion of) the "live out" set for a given local variable. | public boolean | liveRangesIntersect(VarExpr a, VarExpr b) Determines whether or not two variables interfere with one another. | public void | removeVar(LocalExpr expr) Removes a local expression from the interference graph. |
AFTER | final public static boolean AFTER(Code) | | |
BEFORE | final public static boolean BEFORE(Code) | | |
DEBUG | public static boolean DEBUG(Code) | | |
UNIQUE | public static boolean UNIQUE(Code) | | |
Liveness | public Liveness(FlowGraph cfg)(Code) | | Constructor.
Parameters: cfg - Control flow graph on which to perform liveness analysis. |
defs | public Collection defs()(Code) | | Returns the LocalExprs (variables) that occur in the CFG.
They correspond to nodes in the interference graph.
|
intersections | public Iterator intersections(VarExpr a)(Code) | | Returns an Iterator of LocalExprs that interfere
with a given VarExpr.
|
liveAtEndOfBlock | public boolean liveAtEndOfBlock(VarExpr isLive, Block block)(Code) | | Should not be called.
|
liveAtStartOfBlock | public boolean liveAtStartOfBlock(VarExpr isLive, Block block)(Code) | | Should not be called.
|
liveAtUse | public boolean liveAtUse(VarExpr isLive, VarExpr at, boolean after)(Code) | | Should not be called.
|
liveOut | void liveOut(BitSet m, List[] nodes, Block block, int nodeIndex, IGNode defNode, Collection phiCatchNodes)(Code) | | Computes (a portion of) the "live out" set for a given local variable. If
a variable is live on a block's outgoing edge in the CFG, then it is
"live out" at that block.
Parameters: m - Bit vector that indicates the block for which block thedefNode is live out Parameters: nodes - The NodeInfo for the local variables used or defined in eachblock Parameters: block - The block in which the LocalExpr of interest is defined Parameters: nodeIndex - Which number definition in the defining block Parameters: defNode - The node in the IG whose live out set we are interested in Parameters: phiCatchNodes - The nodes in the interference graph that represent localvariables defined by PhiCatchStmts |
liveRangesIntersect | public boolean liveRangesIntersect(VarExpr a, VarExpr b)(Code) | | Determines whether or not two variables interfere with one another.
|
removeVar | public void removeVar(LocalExpr expr)(Code) | | Removes a local expression from the interference graph.
|
|
|