From fd61c60864fa37c11b1b1f4d3e992b0e7347248c Mon Sep 17 00:00:00 2001 From: Anand Shukla Date: Thu, 18 Jul 2002 20:56:47 +0000 Subject: [PATCH] minor corrections llvm-svn: 2971 --- .../Instrumentation/ProfilePaths/EdgeCode.cpp | 3 + .../Instrumentation/ProfilePaths/Graph.cpp | 110 +++++++++++++----- .../Instrumentation/ProfilePaths/Graph.h | 57 ++++----- .../ProfilePaths/GraphAuxiliary.cpp | 51 ++++---- .../ProfilePaths/GraphAuxillary.cpp | 51 ++++---- .../ProfilePaths/ProfilePaths.cpp | 56 ++++----- 6 files changed, 188 insertions(+), 140 deletions(-) diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp index b4629d8c9f72..cb21604b2ea8 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp @@ -338,6 +338,9 @@ void insertBB(Edge ed, //then we need to change branch destinations to include new BB //std::cerr<<"before cast!\n"; + std::cerr<<"Method no in Edgecode:"<(TI); if(BI->isUnconditional()){ diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp index 585aec0a1465..7b8069cfee2d 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp @@ -6,6 +6,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Transforms/Instrumentation/Graph.h" +#include "llvm/iTerminators.h" #include "llvm/BasicBlock.h" #include #include @@ -50,14 +51,48 @@ Graph::Graph(std::vector n, std::vector e, } +//sorting edgelist, called by backEdgeVist ONLY!!! +Graph::nodeList &Graph::sortNodeList(Node *par, nodeList &nl){ + assert(par && "null node pointer"); + BasicBlock *bbPar = par->getElement(); + + if(nl.size()<=1) return nl; + + for(nodeList::iterator NLI = nl.begin(), NLE = nl.end()-1; NLI != NLE; ++NLI){ + nodeList::iterator min = NLI; + for(nodeList::iterator LI = NLI+1, LE = nl.end(); LI!=LE; ++LI){ + //if LI < min, min = LI + if(min->element->getElement() == LI->element->getElement()) + continue; + + + TerminatorInst *tti = par->getElement()->getTerminator(); + BranchInst *ti = cast(tti); + assert(ti && "not a branch"); + assert(ti->getNumSuccessors()==2 && "less successors!"); + + BasicBlock *tB = ti->getSuccessor(0); + BasicBlock *fB = ti->getSuccessor(1); + + if(tB == LI->element->getElement() || fB == min->element->getElement()) + min = LI; + } + + graphListElement tmpElmnt = *min; + *min = *NLI; + *NLI = tmpElmnt; + } + return nl; +} + //check whether graph has an edge //having an edge simply means that there is an edge in the graph //which has same endpoints as the given edge -bool Graph::hasEdge(Edge ed) const{ +bool Graph::hasEdge(Edge ed){ if(ed.isNull()) return false; - nodeList nli=getNodeList(ed.getFirst()); + nodeList &nli= nodes[ed.getFirst()]; //getNodeList(ed.getFirst()); Node *nd2=ed.getSecond(); return (findNodeInList(nli,nd2)!=NULL); @@ -69,12 +104,12 @@ bool Graph::hasEdge(Edge ed) const{ //having an edge simply means that there is an edge in the graph //which has same endpoints as the given edge //This function checks, moreover, that the wt of edge matches too -bool Graph::hasEdgeAndWt(Edge ed) const{ +bool Graph::hasEdgeAndWt(Edge ed){ if(ed.isNull()) return false; Node *nd2=ed.getSecond(); - nodeList nli=getNodeList(ed.getFirst()); + nodeList nli = nodes[ed.getFirst()];//getNodeList(ed.getFirst()); for(nodeList::iterator NI=nli.begin(), NE=nli.end(); NI!=NE; ++NI) if(*NI->element == *nd2 && ed.getWeight()==NI->weight) @@ -109,6 +144,7 @@ void Graph::addEdge(Edge ed, int w){ //ndList.push_front(graphListElement(nd2,w, ed.getRandId())); ndList.push_back(graphListElement(nd2,w, ed.getRandId()));//chng + //sortNodeList(ed.getFirst(), ndList); //sort(ndList.begin(), ndList.end(), NodeListSort()); } @@ -123,6 +159,7 @@ void Graph::addEdgeForce(Edge ed){ nodes[ed.getFirst()].push_back (graphListElement(ed.getSecond(), ed.getWeight(), ed.getRandId())); + //sortNodeList(ed.getFirst(), nodes[ed.getFirst()]); //sort(nodes[ed.getFirst()].begin(), nodes[ed.getFirst()].end(), NodeListSort()); } @@ -166,10 +203,10 @@ void Graph::setWeight(Edge ed){ //get the list of successor nodes -vector Graph::getSuccNodes(Node *nd) const { +vector Graph::getSuccNodes(Node *nd){ nodeMapTy::const_iterator nli = nodes.find(nd); assert(nli != nodes.end() && "Node must be in nodes map"); - const nodeList &nl = nli->second; + const nodeList &nl = getNodeList(nd);//getSortedNodeList(nd); vector lt; for(nodeList::const_iterator NI=nl.begin(), NE=nl.end(); NI!=NE; ++NI) @@ -192,7 +229,7 @@ int Graph::getNumberOfOutgoingEdges(Node *nd) const { } //get the list of predecessor nodes -vector Graph::getPredNodes(Node *nd) const{ +vector Graph::getPredNodes(Node *nd){ vector lt; for(nodeMapTy::const_iterator EI=nodes.begin(), EE=nodes.end(); EI!=EE ;++EI){ Node *lnode=EI->first; @@ -205,7 +242,7 @@ vector Graph::getPredNodes(Node *nd) const{ } //get the number of predecessor nodes -int Graph::getNumberOfIncomingEdges(Node *nd) const{ +int Graph::getNumberOfIncomingEdges(Node *nd){ int count=0; for(nodeMapTy::const_iterator EI=nodes.begin(), EE=nodes.end(); EI!=EE ;++EI){ Node *lnode=EI->first; @@ -371,20 +408,27 @@ void Graph::printGraph(){ //get a list of nodes in the graph //in r-topological sorted order //note that we assumed graph to be connected -vector Graph::reverseTopologicalSort() const{ +vector Graph::reverseTopologicalSort(){ vector toReturn; vector lt=getAllNodes(); for(vector::iterator LI=lt.begin(), LE=lt.end(); LI!=LE; ++LI){ if((*LI)->getWeight()!=GREY && (*LI)->getWeight()!=BLACK) DFS_Visit(*LI, toReturn); } + + //print nodes + //std::cerr<<"Topological sort--------\n"; + //for(vector::iterator VI = toReturn.begin(), VE = toReturn.end(); + // VI!=VE; ++VI) + //std::cerr<<(*VI)->getElement()->getName()<<"->"; + //std::cerr<<"\n----------------------\n"; return toReturn; } //a private method for doing DFS traversal of graph //this is used in determining the reverse topological sort //of the graph -void Graph::DFS_Visit(Node *nd, vector &toReturn) const { +void Graph::DFS_Visit(Node *nd, vector &toReturn){ nd->setWeight(GREY); vector lt=getSuccNodes(nd); for(vector::iterator LI=lt.begin(), LE=lt.end(); LI!=LE; ++LI){ @@ -441,38 +485,48 @@ void Graph::reverseWts(){ //have been visited //So we have a back edge when we meet a successor of //a node with smaller time, and GREY color -void Graph::getBackEdges(vector &be) const{ +void Graph::getBackEdges(vector &be, map &d){ map color; - map d; - vector allNodes=getAllNodes(); + //map d; + //vector allNodes=getAllNodes(); int time=0; - for(vector::const_iterator NI=allNodes.begin(), NE=allNodes.end(); - NI!=NE; ++NI){ - if(color[*NI]!=GREY && color[*NI]!=BLACK) - getBackEdgesVisit(*NI, be, color, d, time); - } + //for(vector::iterator NI=allNodes.begin(), NE=allNodes.end(); + // NI!=NE; ++NI){ + //if(color[*NI]!=GREY && color[*NI]!=BLACK) + //printGraph(); + getBackEdgesVisit(getRoot(), be, color, d, time);//*NI, be, color, d, time); + //} } //helper function to get back edges: it is called by //the "getBackEdges" function above void Graph::getBackEdgesVisit(Node *u, vector &be, map &color, - map &d, int &time) const{ + map &d, int &time) { color[u]=GREY; time++; d[u]=time; - vector succ_list=getNodeList(u); - for(vector::const_iterator vl=succ_list.begin(), + //std::cerr<<"Node list-----\n"; + vector succ_list = getSortedNodeList(u); + + //for(vector::iterator vl=succ_list.begin(), + // ve=succ_list.end(); vl!=ve; ++vl){ + //Node *v=vl->element; + //std::cerr<getElement()->getName()<<"->"; + //} + //std::cerr<<"\n-------- end Node list\n"; + + for(vector::iterator vl=succ_list.begin(), ve=succ_list.end(); vl!=ve; ++vl){ Node *v=vl->element; - // for(vector::const_iterator v=succ_list.begin(), ve=succ_list.end(); - // v!=ve; ++v){ - - if(color[v]!=GREY && color[v]!=BLACK){ - getBackEdgesVisit(v, be, color, d, time); - } - + // for(vector::const_iterator v=succ_list.begin(), ve=succ_list.end(); + // v!=ve; ++v){ + + if(color[v]!=GREY && color[v]!=BLACK){ + getBackEdgesVisit(v, be, color, d, time); + } + //now checking for d and f vals if(color[v]==GREY){ //so v is ancestor of u if time of u > time of v diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h b/llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h index 22280d2db71e..8eb2f724f5ee 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h +++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h @@ -12,19 +12,14 @@ #include "Support/StatisticReporter.h" #include -//#include -//#include #include #include #include "llvm/BasicBlock.h" class BasicBlock; -//class Method; class Module; -//======= class Function; -//>>>>>>> 1.4 class Instruction; //Class Node @@ -43,7 +38,7 @@ public: inline bool operator<(Node& nd) const { return element : public binary_function { @@ -167,7 +162,7 @@ struct EdgeCompare{ } }; -//////////////////// + //this is used to color vertices //during DFS @@ -205,7 +200,7 @@ private: //a private method for doing DFS traversal of graph //this is used in determining the reverse topological sort //of the graph - void DFS_Visit(Node *nd, std::vector &toReturn) const; + void DFS_Visit(Node *nd, std::vector &toReturn); //Its a variation of DFS to get the backedges in the graph //We get back edges by associating a time @@ -221,7 +216,7 @@ private: std::vector &be, std::map &clr, std::map &d, - int &time) const; + int &time); public: typedef nodeMapTy::iterator elementIterator; @@ -269,23 +264,23 @@ public: //having an edge simply means that there is an edge in the graph //which has same endpoints as the given edge //it may possibly have different weight though - bool hasEdge(Edge ed) const; + bool hasEdge(Edge ed); //check whether graph has an edge, with a given wt - bool hasEdgeAndWt(Edge ed) const; + bool hasEdgeAndWt(Edge ed); //get the list of successor nodes - std::vector getSuccNodes(Node *nd) const; + std::vector getSuccNodes(Node *nd); //get the number of outgoing edges int getNumberOfOutgoingEdges(Node *nd) const; //get the list of predecessor nodes - std::vector getPredNodes(Node *nd) const; + std::vector getPredNodes(Node *nd); //to get the no of incoming edges - int getNumberOfIncomingEdges(Node *nd) const; + int getNumberOfIncomingEdges(Node *nd); //get the list of all the vertices in graph std::vector getAllNodes() const; @@ -294,7 +289,7 @@ public: //get a list of nodes in the graph //in r-topological sorted order //note that we assumed graph to be connected - std::vector reverseTopologicalSort() const; + std::vector reverseTopologicalSort(); //reverse the sign of weights on edges //this way, max-spanning tree could be obtained @@ -312,7 +307,9 @@ public: void printGraph(); //get a vector of back edges in the graph - void getBackEdges(std::vector &be) const; + void getBackEdges(std::vector &be, std::map &d); + + nodeList &sortNodeList(Node *par, nodeList &nl); //Get the Maximal spanning tree (also a graph) //of the graph @@ -321,18 +318,18 @@ public: //get the nodeList adjacent to a node //a nodeList element contains a node, and the weight //corresponding to the edge for that element - inline const nodeList &getNodeList(Node *nd) const { - constElementIterator nli = nodes.find(nd); - assert(nli != nodes.end() && "Node must be in nodes map"); - return nli->second; - } - inline nodeList &getNodeList(Node *nd) { elementIterator nli = nodes.find(nd); assert(nli != nodes.end() && "Node must be in nodes map"); - return nli->second; + return nodes[nd];//sortNodeList(nd, nli->second); } - + + nodeList &getSortedNodeList(Node *nd) { + elementIterator nli = nodes.find(nd); + assert(nli != nodes.end() && "Node must be in nodes map"); + return sortNodeList(nd, nodes[nd]); + } + //get the root of the graph inline Node *getRoot() {return strt; } inline Node * const getRoot() const {return strt; } @@ -409,12 +406,8 @@ public: //get the code to be inserted on the edge //This is determined from cond (1-6) - //<<<<<<< Graph.h void getCode(Instruction *a, Instruction *b, Function *M, BasicBlock *BB, int numPaths, int MethNo); - //======= - //void getCode(Instruction *a, Instruction *b, Function *F, BasicBlock *BB); - //>>>>>>> 1.4 }; @@ -426,7 +419,7 @@ void printEdge(Edge ed); //Do graph processing: to determine minimal edge increments, //appropriate code insertions etc and insert the code at //appropriate locations -void processGraph(Graph &g, Instruction *rInst, Instruction *countInst, std::vector &be, std::vector &stDummy, std::vector &exDummy, int n); +void processGraph(Graph &g, Instruction *rInst, Instruction *countInst, std::vector &be, std::vector &stDummy, std::vector &exDummy, int n, int MethNo); //print the graph (for debugging) void printGraph(Graph &g); @@ -457,7 +450,7 @@ void addDummyEdges(std::vector &stDummy, std::vector &exDummy, Graph //such that if we traverse along any path from root to exit, and //add up the edge values, we get a path number that uniquely //refers to the path we travelled -int valueAssignmentToEdges(Graph& g); +int valueAssignmentToEdges(Graph& g, std::map nodePriority); void getBBtrace(std::vector &vBB, int pathNo, Function *M); #endif diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp index 47d4d239d0bc..37dd6ae5d6be 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp @@ -12,6 +12,7 @@ #include "llvm/BasicBlock.h" #include "llvm/InstrTypes.h" #include "llvm/Transforms/Instrumentation/Graph.h" +#include "llvm/iTerminators.h" #include #include #include @@ -68,7 +69,7 @@ static void removeTreeEdges(Graph &g, Graph& t){ //such that if we traverse along any path from root to exit, and //add up the edge values, we get a path number that uniquely //refers to the path we travelled -int valueAssignmentToEdges(Graph& g){ +int valueAssignmentToEdges(Graph& g, map nodePriority){ vector revtop=g.reverseTopologicalSort(); map NumPaths; for(vector::iterator RI=revtop.begin(), RE=revtop.end(); @@ -83,31 +84,36 @@ int valueAssignmentToEdges(Graph& g){ int sz=nlist.size(); - //printing BB list - //std::cerr<<"node list------------\n"; - //for(Graph::nodeList::iterator NLI=nlist.begin(), NLE=nlist.end(); - // NLI!=NLE; ++NLI) - //std::cerr<element->getElement()->getName()<<"->"; - - //std::cerr<<"\n-----------\n"; - for(int i=0;igetElement(); BasicBlock *bb2 = nlist[min].element->getElement(); - assert(bb1->getParent() == bb2->getParent() && - "BBs with diff parents"); - TerminatorInst *ti = bb1->getTerminator(); + + if(bb1 == bb2) continue; + + if(*RI == g.getRoot()){ + assert(nodePriority[nlist[min].element]!= + nodePriority[nlist[j].element] + && "priorities can't be same!"); + + if(nodePriority[nlist[j].element] < + nodePriority[nlist[min].element]) + min = j; + } - //compare the order of BBs in the terminator instruction - for(int x=0, y = ti->getNumSuccessors(); x < y; x++){ - if(ti->getSuccessor(x) == bb1){ //bb1 occurs first + else{ + TerminatorInst *tti = (*RI)->getElement()->getTerminator(); + //std::cerr<<*tti<(tti); + assert(ti && "not a branch"); + assert(ti->getNumSuccessors()==2 && "less successors!"); + + BasicBlock *tB = ti->getSuccessor(0); + BasicBlock *fB = ti->getSuccessor(1); + + if(tB == bb1 || fB == bb2) min = j; - break; - } - if(ti->getSuccessor(x) == bb2) //bb2 occurs first - break; } } @@ -117,11 +123,14 @@ int valueAssignmentToEdges(Graph& g){ } //sorted now! + //std::cerr<<"Considering Order-----\n"; for(Graph::nodeList::iterator GLI=nlist.begin(), GLE=nlist.end(); GLI!=GLE; ++GLI){ + //std::cerr<element->getElement()->getName()<<"->"; GLI->weight=NumPaths[*RI]; NumPaths[*RI]+=NumPaths[GLI->element]; } + //std::cerr<<"\nend order $$$$$$$$$$$$$$$$$$$$$$$$\n"; } } return NumPaths[g.getRoot()]; @@ -474,10 +483,8 @@ void processGraph(Graph &g, vector& be, vector& stDummy, vector& exDummy, - int numPaths){ + int numPaths, int MethNo){ - static int MethNo=-1; - MethNo++; //Given a graph: with exit->root edge, do the following in seq: //1. get back edges //2. insert dummy edges and remove back edges diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxillary.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxillary.cpp index 47d4d239d0bc..37dd6ae5d6be 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxillary.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxillary.cpp @@ -12,6 +12,7 @@ #include "llvm/BasicBlock.h" #include "llvm/InstrTypes.h" #include "llvm/Transforms/Instrumentation/Graph.h" +#include "llvm/iTerminators.h" #include #include #include @@ -68,7 +69,7 @@ static void removeTreeEdges(Graph &g, Graph& t){ //such that if we traverse along any path from root to exit, and //add up the edge values, we get a path number that uniquely //refers to the path we travelled -int valueAssignmentToEdges(Graph& g){ +int valueAssignmentToEdges(Graph& g, map nodePriority){ vector revtop=g.reverseTopologicalSort(); map NumPaths; for(vector::iterator RI=revtop.begin(), RE=revtop.end(); @@ -83,31 +84,36 @@ int valueAssignmentToEdges(Graph& g){ int sz=nlist.size(); - //printing BB list - //std::cerr<<"node list------------\n"; - //for(Graph::nodeList::iterator NLI=nlist.begin(), NLE=nlist.end(); - // NLI!=NLE; ++NLI) - //std::cerr<element->getElement()->getName()<<"->"; - - //std::cerr<<"\n-----------\n"; - for(int i=0;igetElement(); BasicBlock *bb2 = nlist[min].element->getElement(); - assert(bb1->getParent() == bb2->getParent() && - "BBs with diff parents"); - TerminatorInst *ti = bb1->getTerminator(); + + if(bb1 == bb2) continue; + + if(*RI == g.getRoot()){ + assert(nodePriority[nlist[min].element]!= + nodePriority[nlist[j].element] + && "priorities can't be same!"); + + if(nodePriority[nlist[j].element] < + nodePriority[nlist[min].element]) + min = j; + } - //compare the order of BBs in the terminator instruction - for(int x=0, y = ti->getNumSuccessors(); x < y; x++){ - if(ti->getSuccessor(x) == bb1){ //bb1 occurs first + else{ + TerminatorInst *tti = (*RI)->getElement()->getTerminator(); + //std::cerr<<*tti<(tti); + assert(ti && "not a branch"); + assert(ti->getNumSuccessors()==2 && "less successors!"); + + BasicBlock *tB = ti->getSuccessor(0); + BasicBlock *fB = ti->getSuccessor(1); + + if(tB == bb1 || fB == bb2) min = j; - break; - } - if(ti->getSuccessor(x) == bb2) //bb2 occurs first - break; } } @@ -117,11 +123,14 @@ int valueAssignmentToEdges(Graph& g){ } //sorted now! + //std::cerr<<"Considering Order-----\n"; for(Graph::nodeList::iterator GLI=nlist.begin(), GLE=nlist.end(); GLI!=GLE; ++GLI){ + //std::cerr<element->getElement()->getName()<<"->"; GLI->weight=NumPaths[*RI]; NumPaths[*RI]+=NumPaths[GLI->element]; } + //std::cerr<<"\nend order $$$$$$$$$$$$$$$$$$$$$$$$\n"; } } return NumPaths[g.getRoot()]; @@ -474,10 +483,8 @@ void processGraph(Graph &g, vector& be, vector& stDummy, vector& exDummy, - int numPaths){ + int numPaths, int MethNo){ - static int MethNo=-1; - MethNo++; //Given a graph: with exit->root edge, do the following in seq: //1. get back edges //2. insert dummy edges and remove back edges diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp index a3ddab2d64fa..391bc5bb8951 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp @@ -70,10 +70,12 @@ bool ProfilePaths::runOnFunction(Function &F){ static int mn = -1; - if(F.size() <=1) { + if(F.isExternal()) { return false; } + //std::cerr<<"Instrumenting\n-----------------\n"; + //std::cerr< be; - g.getBackEdges(be); - + std::map nodePriority; //it ranks nodes in depth first order traversal + g.getBackEdges(be, nodePriority); + /* + std::cerr<<"Node priority--------------\n"; + for(std::map::iterator MI = nodePriority.begin(), + ME = nodePriority.end(); MI!=ME; ++MI) + std::cerr<first->getElement()->getName()<<"->"<second<<"\n"; + std::cerr<<"End Node priority--------------\n"; + */ //std::cerr<<"BackEdges-------------\n"; // for(vector::iterator VI=be.begin(); VI!=be.end(); ++VI){ //printEdge(*VI); @@ -159,8 +168,9 @@ bool ProfilePaths::runOnFunction(Function &F){ // All paths for now are acyclic, // since no back edges in the graph now // numPaths is the number of acyclic paths in the graph - int numPaths=valueAssignmentToEdges(g); + int numPaths=valueAssignmentToEdges(g, nodePriority); + if(numPaths<=1 || numPaths >5000) return false; //std::cerr<<"Numpaths="< vBB; - - getBBtrace(vBB, i, M); - //get total size of vector - int size=0; - bbs<<"Meth:"<::iterator VBI=vBB.begin(); VBI!=vBB.end(); - ++VBI){ - BasicBlock *BB=*VBI; - size+=BB->size(); - if(BB==M->front()) - size-=numPaths; - bbs<getName()<<"->"; - } - bbs<<"\n--------------\n"; - to<<"::::: "<