class DominatorSystem extends DF_System
Constructor and Description |
---|
DominatorSystem(IR ir)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) DF_LatticeCell[] |
getCellsForPredecessors(BasicBlock bb) |
(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.
|
addAllEquationsToWorkList, addCellAppearancesToWorkList, addNewEquationsToWorkList, addToWorkList, changedCell, findOrCreateCell, getCell, getEquations, getNumberOfEquations, getSolution, newEquation, newEquation, solve, toString, updateWorkList
DominatorSystem(IR ir)
ir
- the governing IRvoid 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 blockprotected DF_LatticeCell makeCell(Object key)
DF_LatticeCell[] getCellsForPredecessors(BasicBlock bb)
bb
- the basic block