Package EDU.purdue.cs.bloat.tree
Class DefExpr
- java.lang.Object
-
- EDU.purdue.cs.bloat.tree.Node
-
- EDU.purdue.cs.bloat.tree.Expr
-
- EDU.purdue.cs.bloat.tree.DefExpr
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddUse(Expr use)voidcleanupOnly()Clean up this expression.booleanhasUse(Expr use)booleanisDef()Determines whether or not this DefExpr defines a local variable in its parent.protected voidremoveUse(Expr use)java.util.Collectionuses()Returns the Exprs in which the variable defined by this are used.intversion()Returns Number DefExpr this is.-
Methods inherited from class EDU.purdue.cs.bloat.tree.Expr
clone, comparator, copyInto, def, equalsExpr, exprHashCode, setDef, setType, stmt, type
-
Methods inherited from class EDU.purdue.cs.bloat.tree.Node
block, cleanup, copyInto, hasParent, key, parent, replaceWith, replaceWith, setKey, setParent, setValueNumber, toString, valueNumber, visit, visitChildren, visitForceChildren, visitOnly
-
-
-
-
Constructor Detail
-
DefExpr
public DefExpr(Type type)
Constructor.- Parameters:
type- The Type (descriptor) of this expression
-
-
Method Detail
-
cleanupOnly
public void cleanupOnly()
Clean up this expression. Notify all the expressions that use this definition that it is no longer their defining expression.- Overrides:
cleanupOnlyin classExpr
-
version
public int version()
Returns Number DefExpr this is. This is also the SSA version number of the expression that this DefExpr defines.
-
isDef
public boolean isDef()
Determines whether or not this DefExpr defines a local variable in its parent.- Overrides:
isDefin classExpr- See Also:
Assign.defs()
-
uses
public java.util.Collection uses()
Returns the Exprs in which the variable defined by this are used.
-
hasUse
public boolean hasUse(Expr use)
-
addUse
protected void addUse(Expr use)
-
removeUse
protected void removeUse(Expr use)
-
-