public class Block extends GraphNode
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.
FlowGraph,
DominatorTree,
DominanceFrontier| Modifier and Type | Field and Description |
|---|---|
static int |
IRREDUCIBLE |
static int |
NON_HEADER |
static int |
REDUCIBLE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
dominates(Block block)
Returns whether or this Block dominates another given Block.
|
FlowGraph |
graph()
Returns the CFG containing the block.
|
Block |
header() |
Label |
label()
Returns the label associated with this block.
|
boolean |
postdominates(Block block)
Determines whether or not this block postdominates a given block.
|
void |
setHeader(Block header) |
void |
setTree(Tree tree)
Sets the expression tree for this block.
|
StackOptimizer |
stackOptimizer()
Returns the stack optimizer for this block.
|
java.lang.String |
toString()
Returns a string representation of this block.
|
Tree |
tree()
Returns the expression tree for this block.
|
void |
visit(TreeVisitor visitor) |
void |
visitChildren(TreeVisitor visitor)
Visits the expression tree contained in this block.
|
public static final int NON_HEADER
public static final int IRREDUCIBLE
public static final int REDUCIBLE
public StackOptimizer stackOptimizer()
public Tree tree()
public void setTree(Tree tree)
public FlowGraph graph()
public Label label()
public void visitChildren(TreeVisitor visitor)
public void visit(TreeVisitor visitor)
public void setHeader(Block header)
public Block header()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean dominates(Block block)
public boolean postdominates(Block block)
DominatorTree