|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.ssa.GVCongruenceClass
final class GVCongruenceClass
This class represents a congruence class for global value numbering.
Field Summary | |
---|---|
private Object |
label
A label representing a property of this congruence class. |
private int |
nParameter
How many vertices in this congruence class represent parameters? |
private ValueGraphVertex |
representativeV
A representative of the congruence class - saves having to find one |
private int |
valueNumber
A value number representing this congruence class. |
private HashSet<ValueGraphVertex> |
vertices
The set of vertices in this congruence class |
Constructor Summary | |
---|---|
GVCongruenceClass(int valueNumber,
Object label)
Create a congruence class with a given representative value number and label. |
Method Summary | |
---|---|
void |
addVertex(ValueGraphVertex v)
Add a vertex to this congruence class. |
boolean |
containsParameter()
Do any of the vertices in this set represent a parameter? |
Object |
getLabel()
|
ValueGraphVertex |
getRepresentative()
Return a representative vertex for this congruence class. |
int |
getValueNumber()
|
Iterator<ValueGraphVertex> |
iterator()
Return an iterator over the vertices in this congruence class |
void |
removeVertex(ValueGraphVertex v)
Remove a vertex from this congruence class. |
int |
size()
Return the number of vertices in this class |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Object label
private final int valueNumber
private int nParameter
private final HashSet<ValueGraphVertex> vertices
private ValueGraphVertex representativeV
Constructor Detail |
---|
GVCongruenceClass(int valueNumber, Object label)
valueNumber
- the value number of the classlabel
- the label of the classMethod Detail |
---|
public Object getLabel()
public int getValueNumber()
public boolean containsParameter()
TODO: for efficiency, keep this information incrementally
public void addVertex(ValueGraphVertex v)
v
- the vertex to addpublic void removeVertex(ValueGraphVertex v)
v
- the vertex to removepublic ValueGraphVertex getRepresentative()
public Iterator<ValueGraphVertex> iterator()
iterator
in interface Iterable<ValueGraphVertex>
public int size()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |