|
|||||||||||
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_Equation
public class DF_Equation
Represents a single Data Flow equation.
Field Summary | |
---|---|
private int |
index
Field used for GraphNode interface. |
protected DF_LatticeCell[] |
operands
The operands. |
protected DF_Operator |
operator
The operator in the equation |
private int |
scratch
|
(package private) int |
topologicalNumber
The number of this equation when the system is sorted in topological order. |
Constructor Summary | |
---|---|
DF_Equation(DF_LatticeCell lhs,
DF_Operator operator,
DF_LatticeCell op1)
Constructor for case of one operand on the right-hand side. |
|
DF_Equation(DF_LatticeCell lhs,
DF_Operator operator,
DF_LatticeCell[] rhs)
Constructor for case of more than three operands on the right-hand side. |
|
DF_Equation(DF_LatticeCell lhs,
DF_Operator operator,
DF_LatticeCell op1,
DF_LatticeCell op2)
Constructor for case of two operands on the right-hand side. |
|
DF_Equation(DF_LatticeCell lhs,
DF_Operator operator,
DF_LatticeCell op1,
DF_LatticeCell op2,
DF_LatticeCell op3)
Constructor for case of three operands on the right-hand side. |
Method Summary | |
---|---|
(package private) boolean |
evaluate()
Evaluate this equation, setting a new value for the left-hand side. |
int |
getIndex()
The index of this node in its graph. |
(package private) DF_LatticeCell |
getLHS()
Return the left-hand side of this equation. |
DF_LatticeCell[] |
getOperands()
Return the operands in this equation. |
(package private) DF_Operator |
getOperator()
Return the operator for this equation |
int |
getScratch()
read the scratch field of int type |
(package private) int |
getTopologicalNumber()
Get the topological number for this equation |
boolean |
hasCell(DF_LatticeCell cell)
Does this equation contain an appearance of a given cell? |
Enumeration<GraphNode> |
inNodes()
Return an enumeration of the equations upon whose results this equation depends. |
Enumeration<GraphNode> |
outNodes()
Return an enumeration of the equations which use the result of this equation. |
void |
setIndex(int i)
Implementation of GraphNode interface. |
int |
setScratch(int o)
set the scratch field of int type |
(package private) void |
setTopologicalNumber(int n)
Get the topological number for this equation |
String |
toString()
Return a string representation of this object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final DF_Operator operator
protected final DF_LatticeCell[] operands
int topologicalNumber
private int index
private int scratch
Constructor Detail |
---|
DF_Equation(DF_LatticeCell lhs, DF_Operator operator, DF_LatticeCell op1)
lhs
- the lattice cell set by this equationoperator
- the equation operatorop1
- the first operand on the rhsDF_Equation(DF_LatticeCell lhs, DF_Operator operator, DF_LatticeCell op1, DF_LatticeCell op2)
lhs
- the lattice cell set by this equationoperator
- the equation operatorop1
- the first operand on the rhsop2
- the second operand on the rhsDF_Equation(DF_LatticeCell lhs, DF_Operator operator, DF_LatticeCell op1, DF_LatticeCell op2, DF_LatticeCell op3)
lhs
- the lattice cell set by this equationoperator
- the equation operatorop1
- the first operand on the rhsop2
- the second operand on the rhsop3
- the third operand on the rhsDF_Equation(DF_LatticeCell lhs, DF_Operator operator, DF_LatticeCell[] rhs)
lhs
- the lattice cell set by this equationoperator
- the equation operatorrhs
- the operands of the right-hand side in orderMethod Detail |
---|
boolean evaluate()
true
if the lhs value changed. false
otherwiseDF_LatticeCell getLHS()
public DF_LatticeCell[] getOperands()
DF_Operator getOperator()
public boolean hasCell(DF_LatticeCell cell)
cell
- the cell in question
public String toString()
toString
in class Object
int getTopologicalNumber()
void setTopologicalNumber(int n)
n
- the topological orderpublic void setIndex(int i)
setIndex
in interface GraphNode
public int getIndex()
GraphNode
Graph.compactNodeNumbering
the nodes of a graph should be
numbered 0 thru (# of nodes in graph - 1).
getIndex
in interface GraphNode
public Enumeration<GraphNode> outNodes()
outNodes
in interface GraphNode
public Enumeration<GraphNode> inNodes()
inNodes
in interface GraphNode
public int getScratch()
GraphElement
getScratch
in interface GraphElement
public int setScratch(int o)
GraphElement
setScratch
in interface GraphElement
o
- the new contents of the int scratch field
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |