diff options
author | Anand Shukla <ashukla@cs.uiuc.edu> | 2003-02-14 20:41:53 +0000 |
---|---|---|
committer | Anand Shukla <ashukla@cs.uiuc.edu> | 2003-02-14 20:41:53 +0000 |
commit | 92d5e30e762601ce1076e548d2281fac39e40fe3 (patch) | |
tree | 60bf5434d7a467f75236cb71d3d4198c11ffecaa /lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp | |
parent | f1c283859b4a2279773d22e0db59763f1f846212 (diff) |
Changes to runtime framework
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5572 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp b/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp index c6a98712fa..50497fdf10 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp @@ -151,7 +151,7 @@ bool Graph::hasEdgeAndWt(Edge ed){ return false; Node *nd2=ed.getSecond(); - nodeList nli = nodes[ed.getFirst()];//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) @@ -400,7 +400,7 @@ Graph* Graph::getMaxSpanningTree(){ //assign wt(v) to all adjacent vertices v of u //only if v is in vt - Graph::nodeList nl=getNodeList(u); + Graph::nodeList &nl = getNodeList(u); for(nodeList::iterator NI=nl.begin(), NE=nl.end(); NI!=NE; ++NI){ Node *v=NI->element; int weight=-NI->weight; @@ -437,7 +437,7 @@ void Graph::printGraph(){ cerr<<"Graph---------------------\n"; for(vector<Node *>::iterator LI=lt.begin(), LE=lt.end(); LI!=LE; ++LI){ cerr<<((*LI)->getElement())->getName()<<"->"; - Graph::nodeList nl=getNodeList(*LI); + Graph::nodeList &nl = getNodeList(*LI); for(Graph::nodeList::iterator NI=nl.begin(), NE=nl.end(); NI!=NE; ++NI){ cerr<<":"<<"("<<(NI->element->getElement()) ->getName()<<":"<<NI->element->getWeight()<<","<<NI->weight<<")"; @@ -483,7 +483,7 @@ void Graph::makeUnDirectional(){ vector<Node* > allNodes=getAllNodes(); for(vector<Node *>::iterator NI=allNodes.begin(), NE=allNodes.end(); NI!=NE; ++NI) { - nodeList nl=getNodeList(*NI); + nodeList &nl = getNodeList(*NI); for(nodeList::iterator NLI=nl.begin(), NLE=nl.end(); NLI!=NLE; ++NLI){ Edge ed(NLI->element, *NI, NLI->weight); if(!hasEdgeAndWt(ed)){ @@ -502,7 +502,7 @@ void Graph::reverseWts(){ vector<Node *> allNodes=getAllNodes(); for(vector<Node *>::iterator NI=allNodes.begin(), NE=allNodes.end(); NI!=NE; ++NI) { - nodeList node_list=getNodeList(*NI); + nodeList &node_list = getNodeList(*NI); for(nodeList::iterator NLI=nodes[*NI].begin(), NLE=nodes[*NI].end(); NLI!=NLE; ++NLI) NLI->weight=-NLI->weight; |