org.jikesrvm.compilers.opt.controlflow
Class DominatorInfo

java.lang.Object
  extended by org.jikesrvm.compilers.opt.controlflow.DominatorInfo

public class DominatorInfo
extends Object

This structure holds dominator-related information for a basic block.


Field Summary
(package private)  BitVector dominators
          A BitVector which represents the dominators of the basic block
(package private)  BasicBlock idom
          The basic block's immediate dominator.
 
Constructor Summary
DominatorInfo(BitVector dominators)
          Make a structure with a given bit set holding the dominators of the basic block.
 
Method Summary
static BasicBlock idom(BasicBlock bb)
          Return the immediate dominator of a basic block.
 boolean isDominatedBy(BasicBlock bb)
          Is the basic block represented by this structure dominated by another basic block?
(package private) static boolean isDominatedBy(BasicBlock slave, BasicBlock master)
          Is one basic block (the slave) dominated by another (the master)?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dominators

final BitVector dominators
A BitVector which represents the dominators of the basic block


idom

BasicBlock idom
The basic block's immediate dominator.

Constructor Detail

DominatorInfo

DominatorInfo(BitVector dominators)
Make a structure with a given bit set holding the dominators of the basic block.

Parameters:
dominators - the bit set
Method Detail

idom

public static BasicBlock idom(BasicBlock bb)
Return the immediate dominator of a basic block.

Note: the dominator info must be calculated before calling this routine

Parameters:
bb - the basic block in question
Returns:
bb's immediate dominator, as cached in bb's DominatorInfo

isDominatedBy

public boolean isDominatedBy(BasicBlock bb)
Is the basic block represented by this structure dominated by another basic block?

Parameters:
bb - the basic block in question
Returns:
true or false

isDominatedBy

static boolean isDominatedBy(BasicBlock slave,
                             BasicBlock master)
Is one basic block (the slave) dominated by another (the master)?

Parameters:
slave - the potential dominatee
master - the potential dominator
Returns:
true or false