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:FlowGraph See Also:DominatorTree See Also:DominanceFrontier
Constructor.
Parameters: label - The block's label. The label may be thought of as the line ofcode at which the block begins. Parameters: graph - The CFG containing the block.
Returns the blocks that are in this block's dominance frontier. The
dominance frontier of a node X in a CFG is the set of all nodes Y such
that X dominates a predacessor of Y, but does not strictly dominate Y.
Nodes in the dominance frontier always have more than one parent (a
join).
See Also:DominanceFrontier
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.
Returns the postdominance frontier for this node. A postdominace frontier
is essentially the same as a dominace frontier, but the postdominance
relationship is used instead of the dominance relationship.
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:DominatorTree
Sets the type of this Block. A Block may have one of three types:
NON_HEADER: Not the header of any loop
IRREDUCIBLE: Header of an irreducible loop
REDUCIBLE: Header of a reducible loop
A loop is a strongly connected component of a control flow graph.
A loop's header is the block that dominates all other blocks in
the loop. A loop is reducible if the only way to enter the loop
is through the header.
Specifies that Block dominates this Block (parent in the dominator tree,
the immediate dominator).
Parameters: block - Block that dominates this Block.