|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.score.dependence.DDEdge scale.score.dependence.DDTransEdge
public final class DDTransEdge
This class represents the set of edges, in the data dependence graph, that have a distance of 0 and the same direction for some array in some loop. It forms a transitive closure.
$Id: DDTransEdge.java,v 1.22 2007-10-04 19:58:24 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
An instance of this class represents a set of data dependence edges
for an array where the edge distance is zero. For example if there
is an edge from A
to B
of zero distance,
and there is an edge from A
to C
of zero
distance, then there is also an edge from B
to
C
of zero distance.
DDEdge
,
DDNormalEdge
,
DataDependence
,
DDGraph
Field Summary |
---|
Fields inherited from class scale.score.dependence.DDEdge |
---|
cAnti, cFlow, cInput, cNone, colors, cOutput, dependenceName, lineType |
Constructor Summary | |
---|---|
DDTransEdge(SubscriptExpr end1,
SubscriptExpr end2,
java.lang.String aname,
boolean spatial)
Create an edge for the data dependence graph. |
Method Summary | |
---|---|
boolean |
addEdge(SubscriptExpr exp,
boolean spatial)
Specify another data dependence edge end point. |
boolean |
chkEnds(Note source,
Note sink)
|
boolean |
contains(SubscriptExpr exp)
Return true if the expression is an end of an edge represented by this instance. |
static int |
created()
Return the number of instances of this class that were created. |
boolean |
forLoop(LoopHeaderChord loop)
Return true if this edge has a source or sink in the specified loop. |
java.lang.String |
format(Note s1,
Note s2,
java.lang.String aname,
int ddtype)
Return a string representation of a data dependence edge. |
long[] |
getDDInfo()
Return the computed data dependence information. |
int |
getDistance(int level)
Return the distance for the specified level. |
int |
getEdgeType(Note source,
Note sink)
Return the data dependence type - flow ,
anti , input , or output . |
void |
getEnds(Vector<Note> v)
Add the SubscriptExpr instances,
that are the edge ends, to the Vector. |
void |
graphDependence(DisplayGraph da,
boolean addChord,
HashSet<Note> nodes,
DDGraph graph)
Create a graphic display of the edges represented by this instancce. |
boolean |
isAnyDistanceKnown()
Return true if the distance is known at any level. |
boolean |
isAnyDistanceNonZero()
Return true if any distance is unknown or not zero at any level. |
boolean |
isAnyDistanceNotKnown()
Return true if the distance is not known at any level. |
boolean |
isDistanceKnown(int level)
Return true if the distance is known at the specified level. |
boolean |
isLoopIndependentDependency()
Return true if the edge is loop-independent dependency. |
boolean |
isTransitive()
Return true if this is a transitive edge set. |
java.util.Iterator<SubscriptExpr> |
iterator()
Return an iterator over the
SubscriptExpr instances that are the edge ends. |
int |
numberEdges()
Return a metric for the number of data dependence edges represented. |
static int |
numberEnds()
Return the number of data dependence edges represented. |
void |
printDDInfo(Note source,
Note sink)
Print to stdout the information about the data dependence. |
int |
removeEdge(SubscriptExpr exp)
Remove to / from this expression. |
boolean |
representsAllInput()
Return true if every edge represented is an input edge. |
java.lang.String |
toString()
|
Methods inherited from class scale.score.dependence.DDEdge |
---|
getArrayName, getNodeID, isSpatial |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DDTransEdge(SubscriptExpr end1, SubscriptExpr end2, java.lang.String aname, boolean spatial)
end1
- is the one end of the edgeend2
- is the other end of the edgeaname
- is the name of array (or scalar) involved in the dependencespatial
- is true if the edge records a spatial dependenceDataDependence
,
DDGraph
Method Detail |
---|
public static int numberEnds()
public static int created()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Iterator<SubscriptExpr> iterator()
iterator
over the
SubscriptExpr
instances that are the edge ends.
iterator
in class DDEdge
public boolean contains(SubscriptExpr exp)
contains
in class DDEdge
public boolean representsAllInput()
representsAllInput
in class DDEdge
public boolean addEdge(SubscriptExpr exp, boolean spatial)
spatial
- is true if the edge records a spatial dependence
public int removeEdge(SubscriptExpr exp)
public void getEnds(Vector<Note> v)
SubscriptExpr
instances,
that are the edge ends, to the Vector.
getEnds
in class DDEdge
public int numberEdges()
numberEdges
in class DDEdge
public long[] getDDInfo()
getDDInfo
in class DDEdge
public boolean isLoopIndependentDependency()
isLoopIndependentDependency
in class DDEdge
public int getDistance(int level)
getDistance
in class DDEdge
public boolean isDistanceKnown(int level)
isDistanceKnown
in class DDEdge
public boolean isAnyDistanceKnown()
isAnyDistanceKnown
in class DDEdge
public boolean isAnyDistanceNotKnown()
isAnyDistanceNotKnown
in class DDEdge
public boolean isAnyDistanceNonZero()
isAnyDistanceNonZero
in class DDEdge
public boolean isTransitive()
isTransitive
in class DDEdge
public int getEdgeType(Note source, Note sink)
flow
,
anti
, input
, or output
. This logic depends on the CFG nodes
being labeled. The source and sink must the
uses of the address represented by the SubscriptExpr
instances that are
the ends of the data dependence edge.
getEdgeType
in class DDEdge
DDGraph
,
DataDependence
public boolean chkEnds(Note source, Note sink)
public void printDDInfo(Note source, Note sink)
printDDInfo
in class DDEdge
public java.lang.String format(Note s1, Note s2, java.lang.String aname, int ddtype)
DDEdge
format
in class DDEdge
s1
- is one end of the edges2
- is another end of the edgeaname
- is the array nameddtype
- is the edge typepublic void graphDependence(DisplayGraph da, boolean addChord, HashSet<Note> nodes, DDGraph graph)
graphDependence
in class DDEdge
da
- is the graph displayaddChord
- is true if the ends of each edge should be added
to the nodes
setnodes
- is the set ofpublic boolean forLoop(LoopHeaderChord loop)
forLoop
in class DDEdge
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |