Skip to content
Snippets Groups Projects
Commit 14b8d93d authored by kotsifa2's avatar kotsifa2
Browse files

Added level information in the dataflow graph.

parent f1e7ff54
No related branches found
No related tags found
No related merge requests found
......@@ -147,6 +147,8 @@ private:
DFEdgeListType OutDFEdges; ///< List of outgoing edges i.e.,
///< DFEdges originating from this DFNode to
///< successor DFNodes
int Level; ///< Distance to the top-level DFNode in the
///< hierarchy
public:
// Iterators
......@@ -214,7 +216,9 @@ public:
DFNode(IntrinsicInst* _II, Function* _FuncPointer, DFNode* _Parent,
int _NumOfDim, std::vector<Value*> _DimLimits) : II(_II),
FuncPointer(_FuncPointer), Parent(_Parent), NumOfDim(_NumOfDim),
DimLimits(_DimLimits) {}
DimLimits(_DimLimits) {
Level = (_Parent) ? _Parent->getLevel() + 1 : 0 ;
}
void addSuccessor(DFNode* N) {
Successors.push_back(N);
......@@ -234,6 +238,9 @@ public:
return FuncPointer;
}
int getLevel() {
return Level;
}
virtual void applyDFNodeVisitor(DFNodeVisitor &V) = 0;
// virtual void applyDFEdgeVisitor(DFEdgeVisitor &V) = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment