-//getting the backedges in a graph
-//Its a variation of DFS to get the backedges in the graph
-//We get back edges by associating a time
-//and a color with each vertex.
-//The time of a vertex is the time when it was first visited
-//The color of a vertex is initially WHITE,
-//Changes to GREY when it is first visited,
-//and changes to BLACK when ALL its neighbors
-//have been visited
-//So we have a back edge when we meet a successor of
-//a node with smaller time, and GREY color
-void CombineBranches::getBackEdges(Function &F){
- std::map<BasicBlock *, Color > color;
- std::map<BasicBlock *, int> d;
- std::map<BasicBlock *, BasicBlock *> be;
- int time=0;
- getBackEdgesVisit(F.begin(), color, d, time, be);
-
- removeRedundant(be);
-}
-
-//Per function pass for inserting counters and call function