Class Block
java.lang.Object
EDU.purdue.cs.bloat.util.GraphNode
EDU.purdue.cs.bloat.cfg.Block
Block represents a basic block of code used in control flow
graphs. A basic block is always entered at its beginning and exits at its
end. That is, its first statement is a label and its last statement is a
jump. There are no other labels or jumps in between.
Each Block knows its parent block and its children in the dominator and postdominator trees. It also knows which blocks are in its dominance frontier and its postdominance frontier.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether or this Block dominates another given Block.graph()Returns the CFG containing the block.header()label()Returns the label associated with this block.booleanpostdominates(Block block) Determines whether or not this block postdominates a given block.voidvoidSets the expression tree for this block.Returns the stack optimizer for this block.toString()Returns a string representation of this block.tree()Returns the expression tree for this block.voidvisit(TreeVisitor visitor) voidvisitChildren(TreeVisitor visitor) Visits the expression tree contained in this block.
-
Field Details
-
NON_HEADER
public static final int NON_HEADER- See Also:
-
IRREDUCIBLE
public static final int IRREDUCIBLE- See Also:
-
REDUCIBLE
public static final int REDUCIBLE- See Also:
-
-
Method Details
-
stackOptimizer
Returns the stack optimizer for this block.- Returns:
- The stack optimizer.
-
tree
-
setTree
Sets the expression tree for this block. -
graph
-
label
Returns the label associated with this block. -
visitChildren
Visits the expression tree contained in this block. -
visit
-
setHeader
-
header
-
toString
-
dominates
Returns whether or this Block dominates another given Block. A node X dominates a node Y when every path from the first node in the CFG (Enter) to Y must pass through X. -
postdominates
Determines whether or not this block postdominates a given block. A block X is said to postdominate a block Y when every path from Y to the last node in the CFG (Exit) passes through X. This relationship can be thought of as the reverse of dominance. That is, X dominates Y in the reverse CFG.- See Also:
-