diff options
author | Chris Lattner <sabre@nondot.org> | 2002-02-26 19:40:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-02-26 19:40:28 +0000 |
commit | 5328c6fd9708b1727e534ecaeda8cc96fb6a81e8 (patch) | |
tree | 2e930ff8dad47a4671385e8a3a7bb069120dadcc /llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp | |
parent | a9b9636aca3c4be9547503e8dcd2fcf6fbe71c28 (diff) | |
download | bcm5719-llvm-5328c6fd9708b1727e534ecaeda8cc96fb6a81e8.tar.gz bcm5719-llvm-5328c6fd9708b1727e534ecaeda8cc96fb6a81e8.zip |
* Changes to compile successfully with GCC 3.0
* Eliminated memory leak in processGraph
* Pass vectors by const reference to moveDummyCode instead of by copy
llvm-svn: 1808
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp index e09a85790e9..03a3e4bcca7 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp @@ -36,8 +36,8 @@ using std::vector; -static Node *findBB(set<Node *> &st, BasicBlock *BB){ - for(set<Node *>::iterator si=st.begin(); si!=st.end(); ++si){ +static Node *findBB(std::set<Node *> &st, BasicBlock *BB){ + for(std::set<Node *>::iterator si=st.begin(); si!=st.end(); ++si){ if(((*si)->getElement())==BB){ return *si; } @@ -95,7 +95,7 @@ bool ProfilePaths::runOnMethod(Method *M){ if (M->getBasicBlocks().size() == 1) { //The graph is made acyclic: this is done //by removing back edges for now, and adding them later on - vector<Edge > be; + vector<Edge> be; g.getBackEdges(be); #ifdef DEBUG_PATH_PROFILES cerr<<"Backedges:"<<be.size()<<endl; @@ -106,8 +106,8 @@ bool ProfilePaths::runOnMethod(Method *M){ //Then we add 2 back edges for it: //1. from root->b (in vector stDummy) //and 2. from a->exit (in vector exDummy) - vector<Edge > stDummy; - vector<Edge > exDummy; + vector<Edge> stDummy; + vector<Edge> exDummy; addDummyEdges(stDummy, exDummy, g, be); //Now, every edge in the graph is assigned a weight |