public class DDGraph
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DDGraph.Arc |
Modifier and Type | Field and Description |
---|---|
static boolean |
not_summarize |
static boolean |
summarize |
Constructor and Description |
---|
DDGraph() |
DDGraph(java.util.ArrayList<DDGraph.Arc> dependence_arcs) |
Modifier and Type | Method and Description |
---|---|
void |
addAllArcs(java.util.ArrayList<DDGraph.Arc> arcs) |
void |
addArc(DDGraph.Arc arc_to_add) |
boolean |
checkAntiDependence(Expression e1,
Expression e2)
Check if there is anti dependence from e1 to e2
|
boolean |
checkEqualDependences(Loop loop)
Check if the dependence direction for the input loop is equal in all
dependences in the graph
|
boolean |
checkFlowDependence(Expression e1,
Expression e2)
Check if there is flow dependence from e1 to e2
|
boolean |
checkLoopCarriedDependence(Loop l)
Check if the dependence direction for the input loop is loop-carried for
any of the dependences in the graph
|
boolean |
checkLoopCarriedDependenceForGraph()
Returns true if there exists a loop carried dependence for ANY loop in
the nest represented by this dependence graph
|
boolean |
checkOutputDependence(Expression e1,
Expression e2)
Check if there is an output dependence from e1 to e2
|
void |
deleteArc(DDGraph.Arc arc) |
void |
filterUnwantedArcs()
Removes arcs with directions:
(.) --> containing '.' = invalid merged direction
|
java.util.ArrayList<DDGraph.Arc> |
getAllArcs() |
java.util.ArrayList<DDGraph.Arc> |
getDependenceArcsFromTo(ArrayAccess expr1,
ArrayAccess expr2)
Obtain all possible dependence information from expr1 to expr2 in a
given loop
|
java.util.ArrayList<DDGraph.Arc> |
getDependences(Expression expr1,
Expression expr2)
Obtain all possible dependence information between a pair of array
accesses in a given loop
|
java.util.ArrayList<DDGraph.Arc> |
getDependences(Statement stmt1,
Statement stmt2)
Obtain all possible dependence information between a pair of statements
in a given loop
|
java.util.ArrayList<DependenceVector> |
getDirectionMatrix(java.util.LinkedList<Loop> nest)
Obtain a matrix representation of direction vectors for the dependences
contained within this dependence graph
|
java.util.ArrayList<DDGraph.Arc> |
getLoopCarriedDependencesForGraph()
Returns a list of all dependences (arcs) that are loop carried with
respect to ANY of the loops in the nest represented by this dependence
graph
|
DDGraph |
getSubGraph(Loop loop)
From the current dependence graph, extract a subgraph containing
dependences only for the specified loop and its inner nest
|
void |
removeDuplicateArcs()
Filter out duplicate and unwanted arcs from the graph
|
void |
summarizeGraph()
Summarize the direction vectors between nodes of this graph
|
java.lang.String |
toString()
Print function to print entire dependence graph information
|
public static final boolean summarize
public static final boolean not_summarize
public DDGraph()
public DDGraph(java.util.ArrayList<DDGraph.Arc> dependence_arcs)
public void addArc(DDGraph.Arc arc_to_add)
public void deleteArc(DDGraph.Arc arc)
public java.util.ArrayList<DDGraph.Arc> getAllArcs()
public void addAllArcs(java.util.ArrayList<DDGraph.Arc> arcs)
public void filterUnwantedArcs()
public void removeDuplicateArcs()
public void summarizeGraph()
public boolean checkLoopCarriedDependenceForGraph()
public java.util.ArrayList<DDGraph.Arc> getLoopCarriedDependencesForGraph()
public boolean checkEqualDependences(Loop loop)
loop
- the loop for which equal dependence direction must be checkedpublic boolean checkLoopCarriedDependence(Loop l)
l
- the loop for which loop-carried dependence existence must be
checkedpublic java.util.ArrayList<DDGraph.Arc> getDependenceArcsFromTo(ArrayAccess expr1, ArrayAccess expr2)
expr1
- - ArrayAccessexpr2
- - ArrayAccesspublic java.util.ArrayList<DDGraph.Arc> getDependences(Expression expr1, Expression expr2)
expr1
- - ArrayAccessexpr2
- - ArrayAccesspublic boolean checkFlowDependence(Expression e1, Expression e2)
e1
- source of dependencee2
- sink of dependencepublic boolean checkAntiDependence(Expression e1, Expression e2)
e1
- source of dependencee2
- sink of dependencepublic boolean checkOutputDependence(Expression e1, Expression e2)
e1
- source of dependencee2
- sink of dependencepublic java.util.ArrayList<DDGraph.Arc> getDependences(Statement stmt1, Statement stmt2)
stmt1
- - Statementstmt2
- - Statementpublic DDGraph getSubGraph(Loop loop)
loop
- the loop and its inner nest for which dependences are to be
extracted into a separate graphDDGraph
that belongs to loop
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.ArrayList<DependenceVector> getDirectionMatrix(java.util.LinkedList<Loop> nest)
nest
- the loop nest for which the matrix needs to be obtainedDependenceVector