|
|||||||||||
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.ssa.IndexPropagationSystem
class IndexPropagationSystem
Represents a set of dataflow equations used to solve the index propagation problem.
Nested Class Summary | |
---|---|
(package private) static class |
IndexPropagationSystem.MeetOperator
Represents a MEET function (intersection) over Cells. |
(package private) class |
IndexPropagationSystem.UpdateDefArrayOperator
Represents an UPDATE_DEF function over two ArrayCells. |
(package private) class |
IndexPropagationSystem.UpdateDefObjectOperator
Represents an UPDATE_DEF function over two ObjectCells. |
(package private) static class |
IndexPropagationSystem.UpdateUseArrayOperator
Represents an UPDATE_USE function over two ArrayCells. |
(package private) static class |
IndexPropagationSystem.UpdateUseObjectOperator
Represents an UPDATE_USE function over two ObjectCells. |
Field Summary | |
---|---|
private IR |
ir
The governing IR. |
private static IndexPropagationSystem.MeetOperator |
MEET
object representing the MEET operator |
private SSADictionary |
ssa
Heap Array SSA lookaside information for the IR. |
private GlobalValueNumberState |
valueNumbers
Results of global value numbering |
Fields inherited from class org.jikesrvm.compilers.opt.dfsolver.DF_System |
---|
cells, workList |
Constructor Summary | |
---|---|
IndexPropagationSystem(IR _ir)
Set up the system of dataflow equations. |
Method Summary | |
---|---|
(package private) void |
addUpdateArrayDefEquation(HeapVariable<?> A1,
HeapVariable<?> A2,
Object array,
Object index)
Add an equation to the system of the form L(A1) = updateDef(L(A2), |
(package private) void |
addUpdateArrayUseEquation(HeapVariable<?> A1,
HeapVariable<?> A2,
Object array,
Object index)
Add an equation to the system of the form L(A1) = updateUse(L(A2), |
(package private) void |
addUpdateObjectDefEquation(HeapVariable<?> A1,
HeapVariable<?> A2,
int valueNumber)
Add an equation to the system of the form L(A1) = updateDef(L(A2), VALNUM(address)) |
(package private) void |
addUpdateObjectUseEquation(HeapVariable<?> A1,
HeapVariable<?> A2,
int valueNumber)
Add an equation to the system of the form L(A1) = updateUse(L(A2), VALNUM(address)) |
protected void |
initializeLatticeCells()
Initialize the lattice variables. |
protected void |
initializeWorkList()
Initialize the work list for the dataflow equation system. |
protected DF_LatticeCell |
makeCell(Object o)
Create an DF_LatticeCell corresponding to an HeapVariable |
(package private) void |
processALoad(Instruction s)
Update the set of dataflow equations to account for the actions of ALoad instruction s The load is of the form x = A[k]. |
(package private) void |
processAStore(Instruction s)
Update the set of dataflow equations to account for the actions of AStore instruction s The store is of the form A[k] = val. |
(package private) void |
processCall(Instruction s)
Update the set of dataflow equations to account for the actions of CALL instruction. |
(package private) void |
processLoad(Instruction s)
Update the set of dataflow equations to account for the actions of a Load instruction The load is of the form x = A[k]. |
(package private) void |
processNew(Instruction s)
Update the set of dataflow equations to account for the actions of allocation instruction s |
(package private) void |
processPhi(Instruction s)
Update the set of dataflow equations to account for the actions of Phi instruction. |
(package private) void |
processStore(Instruction s)
Update the set of dataflow equations to account for the actions of a Store instruction. |
(package private) void |
setupEquations()
Walk through the IR and add dataflow equations for each instruction that affects the values of Array SSA variables. |
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
private final SSADictionary ssa
private final GlobalValueNumberState valueNumbers
private static final IndexPropagationSystem.MeetOperator MEET
Constructor Detail |
---|
public IndexPropagationSystem(IR _ir)
_ir
- the IRMethod Detail |
---|
protected DF_LatticeCell makeCell(Object o)
makeCell
in class DF_System
o
- the heap variable
protected void initializeLatticeCells()
initializeLatticeCells
in class DF_System
protected void initializeWorkList()
initializeWorkList
in class DF_System
void setupEquations()
void processLoad(Instruction s)
The load is of the form x = A[k]. let A_1 be the array SSA variable before the load, and A_2 the array SSA variable after the store. Then we add the dataflow equation L(A_2) = updateUse(L(A_1), VALNUM(k))
Intuitively, this equation represents the fact that A[k] is available after the store
s
- the Load instructionvoid processStore(Instruction s)
The store is of the form A[k] = val. let A_1 be the array SSA variable before the store, and A_2 the array SSA variable after the store. Then we add the dataflow equation L(A_2) = updateDef(L(A_1), VALNUM(k))
Intuitively, this equation represents the fact that A[k] is available after the store
s
- the Store instructionvoid processALoad(Instruction s)
The load is of the form x = A[k]. let A_1 be the array SSA variable before the load, and A_2 the array SSA variable after the load. Then we add the dataflow equation L(A_2) = updateUse(L(A_1), VALNUM(k))
Intuitively, this equation represents the fact that A[k] is available after the store
s
- the Aload instructionvoid processAStore(Instruction s)
The store is of the form A[k] = val. let A_1 be the array SSA variable before the store, and A_2 the array SSA variable after the store. Then we add the dataflow equation L(A_2) = update(L(A_1), VALNUM(k))
Intuitively, this equation represents the fact that A[k] is available after the store
s
- the Astore instructionvoid processNew(Instruction s)
s
- the New instructionvoid processCall(Instruction s)
s
- the Call instructionvoid processPhi(Instruction s)
The instruction has the form A1 = PHI (A2, A3, A4); We add the dataflow equation L(A1) = MEET(L(A2), L(A3), L(A4))
s
- the Phi instructionvoid addUpdateObjectDefEquation(HeapVariable<?> A1, HeapVariable<?> A2, int valueNumber)
A1
- variable in the equationA2
- variable in the equationvalueNumber
- value number of the addressvoid addUpdateObjectUseEquation(HeapVariable<?> A1, HeapVariable<?> A2, int valueNumber)
L(A1) = updateUse(L(A2), VALNUM(address))
A1
- variable in the equationA2
- variable in the equationvalueNumber
- value number of addressvoid addUpdateArrayDefEquation(HeapVariable<?> A1, HeapVariable<?> A2, Object array, Object index)
L(A1) = updateDef(L(A2),)
A1
- variable in the equationA2
- variable in the equationarray
- variable in the equationindex
- variable in the equationvoid addUpdateArrayUseEquation(HeapVariable<?> A1, HeapVariable<?> A2, Object array, Object index)
L(A1) = updateUse(L(A2),)
A1
- variable in the equationA2
- variable in the equationarray
- variable in the equationindex
- variable in the equation
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |