org.jikesrvm.compilers.opt.controlflow
Class DominatorCell

java.lang.Object
  extended by org.jikesrvm.compilers.opt.dfsolver.DF_AbstractCell
      extended by org.jikesrvm.compilers.opt.controlflow.DominatorCell
All Implemented Interfaces:
DF_LatticeCell, GraphElement, GraphNode

 class DominatorCell
extends DF_AbstractCell

DominatorCell represents a set of basic blocks, used in the dataflow calculation


Field Summary
(package private)  BasicBlock block
          The basic block corresponding to this lattice cell.
private static int CAPACITY
          A guess of the upper bound on the number of out edges for most basic blocks.
(package private)  BitVector dominators
          Bit set representation of the dominators for this basic block.
(package private)  IR ir
          Pointer to the governing IR.
 
Constructor Summary
DominatorCell(BasicBlock bb, IR ir)
          Make a bit set for a basic block
 
Method Summary
 void addSingleBlock(BasicBlock bb)
          Include a single basic block in this set.
 void setTOP(IR ir)
          Include all basic blocks in this set.
 String toString()
          Return a String representation of this cell.
 
Methods inherited from class org.jikesrvm.compilers.opt.dfsolver.DF_AbstractCell
addDef, addUse, getDefs, getIndex, getScratch, getUses, inNodes, outNodes, setIndex, setScratch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ir

final IR ir
Pointer to the governing IR.


block

final BasicBlock block
The basic block corresponding to this lattice cell.


dominators

BitVector dominators
Bit set representation of the dominators for this basic block.


CAPACITY

private static final int CAPACITY
A guess of the upper bound on the number of out edges for most basic blocks.

See Also:
Constant Field Values
Constructor Detail

DominatorCell

public DominatorCell(BasicBlock bb,
                     IR ir)
Make a bit set for a basic block

Parameters:
bb - the basic block
ir - the governing IR
Method Detail

toString

public String toString()
Return a String representation of this cell.

Specified by:
toString in interface DF_LatticeCell
Specified by:
toString in class DF_AbstractCell
Returns:
a String representation of this cell.

addSingleBlock

public void addSingleBlock(BasicBlock bb)
Include a single basic block in this set.

Parameters:
bb - the basic block

setTOP

public void setTOP(IR ir)
Include all basic blocks in this set.

TODO: make this more efficient.

Parameters:
ir - the governing ir