public class DominatorTreeNode extends TreeNode
TODO: we do not support IRs with exception handlers!!
Modifier and Type | Field and Description |
---|---|
private BasicBlock |
block
the basic block this node represents
|
private int |
depth
distance from the root of the dominator tree, lazily initialized (-1 => not
initialized)
|
private BitVector |
dominanceFrontier
representation of the dominance frontier for this node
|
(package private) BitVector |
dominators
the cache to hold the set of nodes that dominate this one.
|
private int |
high
upper bound of dominated nodes range
|
private int |
low
lower bound of dominated nodes range
|
Constructor and Description |
---|
DominatorTreeNode(BasicBlock block)
Construct a dominator tree node for a given basic block.
|
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
_isDominatedBy(DominatorTreeNode master)
This method returns true if the passed node dominates this node
|
(package private) Enumeration<BasicBlock> |
domFrontierEnumerator(IR ir)
Enumerate the basic blocks in the dominance frontier for this node.
|
(package private) String |
dominanceFrontierString()
Return a string representation of the dominance frontier for this
node.
|
(package private) BitVector |
dominators(IR ir)
This method returns the set of blocks that dominates the passed
block, i.e., it answers the question "Who dominates me?"
|
BasicBlock |
getBlock()
Get the basic block for this dominator tree node
|
(package private) int |
getDepth()
Return the distance of this node from the root of the dominator tree.
|
(package private) BitVector |
getDominanceFrontier()
Return a bit set representing the dominance frontier for this node
|
private void |
initializeRanges() |
private int |
initializeRanges(int i) |
(package private) boolean |
isDominatedBy(DominatorTreeNode master)
This method returns true if the passed node dominates this node
|
(package private) void |
setDominanceFrontier(BitVector set)
Set a bit set representing the dominance frontier for this node
|
String |
toString()
String-i-fies the node
|
addChild, clear, getChildren, getLeftChild, getParent, getRightSibling
private final BasicBlock block
private int depth
private BitVector dominanceFrontier
BitVector dominators
private int low
private int high
DominatorTreeNode(BasicBlock block)
block
- the basic blockpublic BasicBlock getBlock()
int getDepth()
BitVector getDominanceFrontier()
void setDominanceFrontier(BitVector set)
set
- the bit setString dominanceFrontierString()
BitVector dominators(IR ir)
ir
- the governing IRboolean _isDominatedBy(DominatorTreeNode master)
master
- the proposed dominating nodeboolean isDominatedBy(DominatorTreeNode master)
master
- the proposed dominating nodeprivate void initializeRanges()
private int initializeRanges(int i)
Enumeration<BasicBlock> domFrontierEnumerator(IR ir)
ir
- the governing IR