Class Liveness
java.lang.Object
EDU.purdue.cs.bloat.codegen.Liveness
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondefs()Returns the LocalExprs (variables) that occur in the CFG.Returns an Iterator of LocalExprs that interfere with a given VarExpr.booleanliveAtEndOfBlock(VarExpr isLive, Block block) Should not be called.booleanliveAtStartOfBlock(VarExpr isLive, Block block) Should not be called.booleanShould not be called.booleanDetermines whether or not two variables interfere with one another.voidRemoves a local expression from the interference graph.
-
Field Details
-
DEBUG
public static boolean DEBUG -
UNIQUE
public static boolean UNIQUE -
BEFORE
public static final boolean BEFORE- See Also:
-
AFTER
public static final boolean AFTER- See Also:
-
-
Constructor Details
-
Liveness
Constructor.- Parameters:
cfg- Control flow graph on which to perform liveness analysis.
-
-
Method Details
-
removeVar
Removes a local expression from the interference graph. -
liveAtUse
-
liveAtStartOfBlock
-
liveAtEndOfBlock
-
defs
Returns the LocalExprs (variables) that occur in the CFG. They correspond to nodes in the interference graph. -
intersections
-
liveRangesIntersect
-