class LTDominatorInfo extends Object
LTDominators
Modifier and Type | Field and Description |
---|---|
private BasicBlock |
ancestor |
private Enumeration<BasicBlock> |
bbEnum |
private HashSet<BasicBlock> |
bucket |
private BasicBlock |
child |
(package private) static boolean |
DEBUG |
private BasicBlock |
dominator
the immediate dominator
|
private BasicBlock |
label |
private BasicBlock |
parent |
private int |
semiDominator |
private int |
size |
Constructor and Description |
---|
LTDominatorInfo(BasicBlock block) |
Modifier and Type | Method and Description |
---|---|
void |
addToBucket(BasicBlock block)
Adds the passed block from the bucket for this node
|
BitVector |
dominators(BasicBlock block,
IR ir)
This method returns the set of blocks that dominates the passed
block, i.e., it answers the question "Who dominates me?"
|
BasicBlock |
getAncestor()
Returns the ancestor for this block
|
Iterator<BasicBlock> |
getBucketIterator()
Returns an iterator over this block's bucket
|
BasicBlock |
getChild()
returns the child
|
BasicBlock |
getDominator()
Returns the immediate dominator for this node
|
Enumeration<BasicBlock> |
getEnum()
Helper method to return the Info field associated with a block
|
static BasicBlock |
getIdom(BasicBlock bb,
IR ir)
return the immediate dominator of a basic block.
|
static LTDominatorInfo |
getInfo(BasicBlock block,
IR ir)
Helper method to return the Info field associated with a block
|
BasicBlock |
getLabel()
returns the label
|
BasicBlock |
getParent()
Returns the parent of this block
|
int |
getSemiDominator()
Returns the semidomintor for this node
|
int |
getSize()
returns the size
|
static boolean |
isDominatedBy(BasicBlock block,
BasicBlock master,
IR ir)
This method determines if the 1st parameter (block) is dominated by
the 2nd parameter (master), i.e., must control pass through "master"
before reaching "block"
|
void |
removeFromBucket(BasicBlock block)
Removes the passed block from the bucket for this node
|
void |
setAncestor(BasicBlock value)
Sets the ancestor for the value passed
|
void |
setChild(BasicBlock value)
sets the child field
|
void |
setDominator(BasicBlock value)
Sets the immediate dominator for this node
|
void |
setEnum(Enumeration<BasicBlock> bbEnum)
set the basic block enum field
|
void |
setLabel(BasicBlock value)
sets the label
|
void |
setParent(BasicBlock value)
Sets the parent of this block
|
void |
setSemiDominator(int value)
Sets the semidominator for this node
|
void |
setSize(int value)
sets the size
|
String |
toString()
Prints a string version of objection
|
static final boolean DEBUG
private int semiDominator
private BasicBlock dominator
private BasicBlock parent
private final HashSet<BasicBlock> bucket
private BasicBlock label
private BasicBlock ancestor
private int size
private BasicBlock child
private Enumeration<BasicBlock> bbEnum
LTDominatorInfo(BasicBlock block)
block
- the basic block this info is associated withpublic BitVector dominators(BasicBlock block, IR ir)
block
- the block of interestir
- the governing irpublic static boolean isDominatedBy(BasicBlock block, BasicBlock master, IR ir)
block
- the block we care aboutmaster
- the potential dominating blockir
- the IR that contains the blockspublic void setSemiDominator(int value)
value
- the new valuepublic int getSemiDominator()
public void setDominator(BasicBlock value)
value
- the value to setpublic BasicBlock getDominator()
public void setParent(BasicBlock value)
value
- the valuepublic BasicBlock getParent()
public Iterator<BasicBlock> getBucketIterator()
public void removeFromBucket(BasicBlock block)
block
- the block to remove from the bucketpublic void addToBucket(BasicBlock block)
block
- the block to add to our bucketpublic void setAncestor(BasicBlock value)
value
- the ancestor valuepublic BasicBlock getAncestor()
public void setLabel(BasicBlock value)
value
- the labelpublic BasicBlock getLabel()
public void setSize(int value)
value
- the sizepublic int getSize()
public void setChild(BasicBlock value)
value
- the child valuepublic BasicBlock getChild()
public Enumeration<BasicBlock> getEnum()
public void setEnum(Enumeration<BasicBlock> bbEnum)
bbEnum
- basic block enumpublic static LTDominatorInfo getInfo(BasicBlock block, IR ir)
block
- the block of interestir
- the IR that contains the information about the dominatorspublic static BasicBlock getIdom(BasicBlock bb, IR ir)
bb
- the basic block in questionir
- the IR that contains the information about the dominators