|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.frontend.fortran.EquivSet
public final class EquivSet
This class tracks equivalence sets.
$Id: EquivSet.java,v 1.4 2007-03-21 13:32:06 burrill Exp $
Copyright 2006 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
An equivalence set specifies that all variables in the set share the same memory location at some offset in each variable when the variables are mapped to memory.
Constructor Summary | |
---|---|
EquivSet(EquivSet prev)
Create a new equivalence set and link it to the previous sets to form a linked list of sets. |
Method Summary | |
---|---|
void |
addEntry(VariableDecl decl,
long offset)
Add the variable to this equivalence set. |
VariableDecl |
getBaseVariable()
If any of the variables in the equivalence set are in COMMON, return the COMON variable or null if none. |
VariableDecl |
getDecl(int i)
Return the specified variable in the set. |
int |
getIndexLargestOffset()
Return the index of the equivalenced variable to use as the base. |
long |
getOffset(int i)
Return the offset of the specified variable in the set. |
EquivSet |
getPrevious()
Return the next set in the linked list. |
int |
numInSet()
Return the number of variables in the set. |
java.lang.String |
toString()
|
void |
update(VariableDecl decl,
EquivalenceDecl ev)
Replace a variable instance with an equivalence variable instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EquivSet(EquivSet prev)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public EquivSet getPrevious()
public VariableDecl getBaseVariable()
null
if none.
public int numInSet()
public VariableDecl getDecl(int i)
public long getOffset(int i)
public int getIndexLargestOffset()
public void update(VariableDecl decl, EquivalenceDecl ev) throws InvalidException
InvalidException
public void addEntry(VariableDecl decl, long offset) throws InvalidException
decl
- is the variableoffset
- is the offset in the variable of the equivalence point
InvalidException
- if two sets can not be merged
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |