|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.score.analyses.MayDef
public class MayDef
A node to represent MayDef information in the alias SSA form (some people call them preserving defs or weak updates).
$Id: MayDef.java,v 1.6 2007-10-04 19:58:21 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
The MayDef info represents an assignment that indirectly may change the value of a variable. However, it may not, which means that the old defintion is still valid. The May Def operator may only be associated with assignment and call operators.
We model the may def information as described in the paper Effective Representation of Aliases and Indirect Memory Operations in SSA Form by Chow et. al.
MayUse
Constructor Summary | |
---|---|
MayDef(LoadDeclAddressExpr lhs,
LoadDeclValueExpr rhs)
Create may def information. |
Method Summary | |
---|---|
void |
addDefUse(MayUse expr)
Add a new link from the definition to the use. |
boolean |
checkDefUse(MayUse use)
Return true is a def-use link exists. |
MayDef |
copy()
Return a deep-copy of this object. |
DColor |
getDisplayColorHint()
Return an interger specifying the color to use for coloring this node in a graphical display. |
java.lang.String |
getDisplayLabel()
Return the representative name for the operation. |
java.lang.String |
getDisplayName()
Return a unique label for graphical displays. |
DShape |
getDisplayShapeHint()
Return a String specifying a shape to use when drawing this node in a graphical display. |
Note |
getGraphNode()
Return the scribble/score node that represents the real use of the may use information. |
LoadDeclAddressExpr |
getLhs()
Get the lhs of the may definition. |
LoadDeclValueExpr |
getRhs()
Get the rhs of the may definition. |
void |
removeDefUse(MayUse expr)
Remove an existing link from the definition to the use. |
void |
setGraphNode(Note graphNode)
Connect the may-use to the node where the use occurs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MayDef(LoadDeclAddressExpr lhs, LoadDeclValueExpr rhs)
lhs
- the left-hand-side of the may definition (a virtual variable)rhs
- the right-hand-side of the may definition (a virtual variable)Method Detail |
---|
public MayDef copy()
public final LoadDeclAddressExpr getLhs()
public final LoadDeclValueExpr getRhs()
public final void addDefUse(MayUse expr)
expr
- the new use-def linkpublic final void removeDefUse(MayUse expr)
expr
- the existing use-def linkpublic void setGraphNode(Note graphNode)
public Note getGraphNode()
public java.lang.String getDisplayLabel()
getDisplayLabel
in interface DisplayNode
public DColor getDisplayColorHint()
DisplayNode
getDisplayColorHint
in interface DisplayNode
DColor
public final boolean checkDefUse(MayUse use)
public DShape getDisplayShapeHint()
getDisplayShapeHint
in interface DisplayNode
DShape
public java.lang.String getDisplayName()
getDisplayName
in interface DisplayNode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |