|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectscale.common.Root
scale.score.Note
scale.score.expr.Expr
scale.score.expr.LoadExpr
public abstract class LoadExpr
This class is the base class for expressions that represent references to memory.
$Id: LoadExpr.java,v 1.90 2007-10-17 13:40:00 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 represents use-def chains.
| Field Summary |
|---|
| Fields inherited from class scale.score.expr.Expr |
|---|
fpReorder, SE_DOMAIN, SE_NONE, SE_OVERFLOW, SE_STATE |
| Constructor Summary | |
|---|---|
protected |
LoadExpr()
|
|
LoadExpr(Type t,
Declaration decl)
|
| Method Summary | |
|---|---|
void |
addMayUse(MayUse mayUse)
Add may use information to the load expression. |
long |
canonical()
Return a unique value representing this particular expression. |
boolean |
containsDeclaration(Declaration decl)
Return true if this expression contains a reference to the variable. |
abstract Expr |
copyNoUD()
Make a copy of this load expression without the use - def information. |
boolean |
dependsOnDeclaration(Declaration decl)
Return true if this expression's value depends on the variable. |
boolean |
equivalent(Expr exp)
Return true if the expressions are equivalent. |
SubscriptExpr |
findSubscriptExpr()
Return the SubscriptExpr that this load
uses or null if none is found. |
AliasAnnote |
getAliasAnnote()
Get the alias annotation associated with a Scribble operator. |
Declaration |
getDecl()
Return the Clef declaration of the variable being loaded. |
void |
getDeclList(java.util.AbstractCollection<Declaration> varList)
Add all declarations referenced in this expression to the Vector. |
void |
getExprList(Vector<Expr> expList)
Add all Expr instances in this expression to the Vector. |
void |
getLoadExprList(Vector<LoadExpr> expList)
Add all LoadExpr instances in this expression to the Vector. |
MayUse |
getMayUse()
Return the may use information assocaited with the load. |
java.lang.String |
getName()
Return the name of the declaration being loaded. |
Expr |
getObject()
Given a load expression, return the object expression for the load. |
Expr[] |
getOperandArray()
Return an array of the operands to the expression. |
Expr |
getReference()
Return the value associated with the load expression. |
int |
getReuseLevel()
|
Declaration |
getSubsetDecl()
Return the original declaration of the value loaded. |
ExprChord |
getUseDef()
Return the ExprChord that defines
the value load by this load expression. |
boolean |
isMemoryDef()
Return true if the node reference is a definition. |
boolean |
isMemRefExpr()
Return true if the expression loads a value from memory. |
void |
loopClean()
Clean up any loop related information. |
int |
numOperands()
Return the number of operands to this expression. |
void |
pushOperands(Stack<Expr> wl)
Push all of the operands of this expression on the Stack. |
void |
recordRefs(Chord stmt,
References refs)
Record any variable references in this expression in the table of references. |
boolean |
referencesVariableInCommon()
Return true if the variable referenced is in Fortran COMMON. |
void |
removeRefs(Chord stmt,
References refs)
Remove any variable references in this expression from the table of references. |
void |
removeUseDef()
Remove any use - def links, may - use links, etc. |
boolean |
replaceDecl(Declaration oldDecl,
Declaration newDecl)
Replace all occurrances of a Declaration with another Declaration. |
void |
setCrossloopReuse(int level)
|
void |
setDecl(Declaration decl)
Change the declaration associated with the load operation. |
void |
setSpatialReuse(int level)
|
void |
setStep(int step)
|
void |
setTemporalReuse(int level)
|
void |
setUseDef(ExprChord expr)
Define a link from this load of a value to the scale.score.chords.ExprChord that defines the value. |
static boolean |
setUseMayUse(boolean flg)
Specify whether the equivalent() method should use
the may-use information. |
static boolean |
setUseOriginal(boolean flg)
Specify whether the equivalent() method should use the non-SSA original VariableDecl. |
int |
sideEffects()
Return an indication of the side effects execution of this expression may cause. |
void |
unlinkExpression()
If the node is no longer needed, sever its use-def link, etc. |
void |
validate()
Check this node for validity. |
boolean |
validLValue()
Return true if this expression is valid on the left side of an assignment. |
| Methods inherited from class scale.score.Note |
|---|
executionCostEstimate, getChord, getEssentialUse, setAnnotationLevel, setReportLevel, toString, visit |
| Methods inherited from class scale.common.Root |
|---|
addAnnotation, allAnnotations, allMatchingAnnotations, getAnnotation, getDisplayName, getDisplayString, getNodeCount, getNodeID, hasAnnotation, hasEqualAnnotation, hashCode, removeAnnotation, removeAnnotations, toStringAnnotations, toStringClass, trace, trace, trace |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LoadExpr(Type t,
Declaration decl)
protected LoadExpr()
| Method Detail |
|---|
public Declaration getSubsetDecl()
public boolean equivalent(Expr exp)
equivalent in class ExprsetUseOriginal(boolean)public static boolean setUseOriginal(boolean flg)
VariableDecl.
equivalent(scale.score.expr.Expr),
PREpublic static boolean setUseMayUse(boolean flg)
equivalent() method should use
the may-use information.
equivalent(scale.score.expr.Expr),
ValNumpublic abstract Expr copyNoUD()
public final void setUseDef(ExprChord expr)
setUseDef in class Exprexpr - the new use-def linkpublic final ExprChord getUseDef()
ExprChord that defines
the value load by this load expression.
getUseDef in class Exprpublic void addMayUse(MayUse mayUse)
mayUse - the expresion representing the may usepublic final MayUse getMayUse()
public void removeUseDef()
removeUseDef in class Exprpublic final Declaration getDecl()
public final void setDecl(Declaration decl)
decl - is the new declataionpublic java.lang.String getName()
public final Expr[] getOperandArray()
getOperandArray in class Exprpublic final int numOperands()
numOperands in class Exprpublic Expr getReference()
getReference in class Exprpublic Expr getObject()
public long canonical()
canonical in class Exprpublic void loopClean()
loopClean in class Exprpublic void unlinkExpression()
unlinkExpression in class Exprpublic boolean isMemoryDef()
isMemoryDef in class Exprpublic SubscriptExpr findSubscriptExpr()
SubscriptExpr that this load
uses or null if none is found. This method uses the
use-def link to find an existing SubscriptExpr
findSubscriptExpr in class Exprpublic void setTemporalReuse(int level)
setTemporalReuse in class Exprpublic void setCrossloopReuse(int level)
setCrossloopReuse in class Exprpublic void setSpatialReuse(int level)
setSpatialReuse in class Exprpublic void setStep(int step)
setStep in class Exprpublic int getReuseLevel()
getReuseLevel in class Exprpublic boolean isMemRefExpr()
isMemRefExpr in class Exprpublic final boolean referencesVariableInCommon()
public boolean validLValue()
validLValue in class Exprpublic final boolean containsDeclaration(Declaration decl)
containsDeclaration in class ExprsetUseOriginal(boolean)public final boolean dependsOnDeclaration(Declaration decl)
dependsOnDeclaration in class ExprsetUseOriginal(boolean)public AliasAnnote getAliasAnnote()
getAliasAnnote in class Exprpublic void getDeclList(java.util.AbstractCollection<Declaration> varList)
getDeclList in class Exprpublic void getLoadExprList(Vector<LoadExpr> expList)
getLoadExprList in class Exprpublic void getExprList(Vector<Expr> expList)
getExprList in class Exprpublic void pushOperands(Stack<Expr> wl)
pushOperands in class Expr
public boolean replaceDecl(Declaration oldDecl,
Declaration newDecl)
replaceDecl in class Exprpublic void validate()
validate in class Expr
public void recordRefs(Chord stmt,
References refs)
recordRefs in class Expr
public void removeRefs(Chord stmt,
References refs)
removeRefs in class Exprpublic int sideEffects()
sideEffects in class ExprExpr.SE_NONE
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||