|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.dfsolver.DF_System org.jikesrvm.compilers.opt.controlflow.DominatorSystem
class DominatorSystem
Implementation of the dataflow equation system to calculate dominators.
Field Summary | |
---|---|
private IR |
ir
The governing IR. |
Fields inherited from class org.jikesrvm.compilers.opt.dfsolver.DF_System |
---|
cells, workList |
Constructor Summary | |
---|---|
DominatorSystem(IR ir)
Default constructor. |
Method Summary | |
---|---|
(package private) DF_LatticeCell[] |
getCellsForPredecessors(BasicBlock bb)
Return a list of lattice cells corresponding to the predecessors of a basic block. |
(package private) Object |
getKey(BasicBlock bb)
Get the DF_LatticeCell key corresponding to a basic block |
protected void |
initializeLatticeCells()
Initialize the lattice variables (Dominator sets) for each basic block. |
protected void |
initializeWorkList()
Initialize the work list for the dataflow equation system. |
protected DF_LatticeCell |
makeCell(Object key)
Make a new DF_LatticeCell key corresponding to a basic block |
(package private) void |
setupEquations()
Go through each basic block in the IR, and add equations to the system as required. |
Methods inherited from class org.jikesrvm.compilers.opt.dfsolver.DF_System |
---|
addAllEquationsToWorkList, addCellAppearancesToWorkList, addNewEquationsToWorkList, addToWorkList, changedCell, findOrCreateCell, getCell, getEquations, getNumberOfEquations, getSolution, newEquation, newEquation, solve, toString, updateWorkList |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final IR ir
Constructor Detail |
---|
public DominatorSystem(IR ir)
ir
- the governing IRMethod Detail |
---|
void setupEquations()
Uses the algorithm contained in Dragon book, pg. 670-1.
D(n0) := { n0 } for n in N - { n0 } do D(n) := N; while changes to any D(n) occur do for n in N - {n0} do D(n) := {n} U (intersect of D(p) over all predecessors p of n)
protected void initializeLatticeCells()
initializeLatticeCells
in class DF_System
protected void initializeWorkList()
The initial work list is every equation containing the start node.
initializeWorkList
in class DF_System
Object getKey(BasicBlock bb)
bb
- the basic block
protected DF_LatticeCell makeCell(Object key)
makeCell
in class DF_System
key
- the basic block
DF_LatticeCell[] getCellsForPredecessors(BasicBlock bb)
bb
- the basic block
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |