|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.score.trans.ExprMap
public final class ExprMap
Map from an expression to another expression.
$Id: ExprMap.java,v 1.33 2007-10-04 19:58:35 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
This class is used solely by the value numbering optimization.
ValNum
Constructor Summary | |
---|---|
ExprMap(int capacity)
|
Method Summary | |
---|---|
Expr |
get(Expr key)
Return the mapped value for the specified key. |
Expr |
getKey()
Return the actual expression used as the key. |
ExprChord |
getUseDef()
Return the ExprChord to use for the use-def link. |
boolean |
hasMultipleOccurrences()
Return true if the expression has more than one occurrence. |
boolean |
insertCopyRequired()
Return true if a copy into a temporary is required. |
Expr |
put(Expr key,
Expr value,
ExprChord ud,
boolean insertCopy,
Stack<java.lang.Object> hashedExprs)
Place an entry in the map unless it is already there. |
void |
remove(Stack<java.lang.Object> hashedExprs)
Remove the specified mapping. |
void |
setUseDef(ExprChord se)
Set the ExprChord to use for the use-def link. |
void |
specifyMultipleOccurrences()
Specify that the current entry has multiple occurrences. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExprMap(int capacity)
capacity
- initial capacity - should be primeMethod Detail |
---|
public final Expr put(Expr key, Expr value, ExprChord ud, boolean insertCopy, Stack<java.lang.Object> hashedExprs)
key
- map from this expressionvalue
- map to this expressionud
- use-def linkinsertCopy
- is true if a copy into a new temporary variable
is neededhashedExprs
- is the set of expressions that are mapped
public void specifyMultipleOccurrences()
public boolean hasMultipleOccurrences()
true
if the expression has more than one occurrence.
public final Expr get(Expr key)
getUseDef()
,
setUseDef(scale.score.chords.ExprChord)
public final boolean insertCopyRequired()
public final ExprChord getUseDef()
public final Expr getKey()
public final void setUseDef(ExprChord se)
public final void remove(Stack<java.lang.Object> hashedExprs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |