summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-09-10 20:35:33 +0000
committerChris Lattner <sabre@nondot.org>2003-09-10 20:35:33 +0000
commit1df2998451793ba5afae6972af242c4c36ac133d (patch)
tree8c29289945e4b6d13a4394153fc3bbc77a0400aa /lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
parent4ea31ca3912ae2ac586a21c599fb4eb039a9478f (diff)
downloadllvm-1df2998451793ba5afae6972af242c4c36ac133d.tar.gz
llvm-1df2998451793ba5afae6972af242c4c36ac133d.tar.bz2
llvm-1df2998451793ba5afae6972af242c4c36ac133d.tar.xz
Update for new UnifyFunction... API
Remove using decl git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp')
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
index 96150142e3..e94f0b7876 100644
--- a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
+++ b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
@@ -35,7 +35,6 @@
#include "Graph.h"
#include <fstream>
#include "Config/stdio.h"
-using std::vector;
struct ProfilePaths : public FunctionPass {
bool runOnFunction(Function &F);
@@ -72,7 +71,8 @@ bool ProfilePaths::runOnFunction(Function &F){
mn++;
// Transform the cfg s.t. we have just one exit node
- BasicBlock *ExitNode = getAnalysis<UnifyFunctionExitNodes>().getExitNode();
+ BasicBlock *ExitNode =
+ getAnalysis<UnifyFunctionExitNodes>().getReturnBlock();
//iterating over BBs and making graph
std::vector<Node *> nodes;
@@ -118,13 +118,13 @@ bool ProfilePaths::runOnFunction(Function &F){
// The graph is made acyclic: this is done
// by removing back edges for now, and adding them later on
- vector<Edge> be;
+ std::vector<Edge> be;
std::map<Node *, int> nodePriority; //it ranks nodes in depth first order traversal
g.getBackEdges(be, nodePriority);
#ifdef DEBUG_PATH_PROFILES
std::cerr<<"BackEdges-------------\n";
- for(vector<Edge>::iterator VI=be.begin(); VI!=be.end(); ++VI){
+ for (std::vector<Edge>::iterator VI=be.begin(); VI!=be.end(); ++VI){
printEdge(*VI);
cerr<<"\n";
}
@@ -140,8 +140,8 @@ bool ProfilePaths::runOnFunction(Function &F){
//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;
+ std::vector<Edge> stDummy;
+ std::vector<Edge> exDummy;
addDummyEdges(stDummy, exDummy, g, be);
#ifdef DEBUG_PATH_PROFILES
@@ -183,7 +183,7 @@ bool ProfilePaths::runOnFunction(Function &F){
F.getParent()->getOrInsertFunction("reoptimizerInitialize", Type::VoidTy,
PointerType::get(Type::IntTy), 0);
- vector<Value *> trargs;
+ std::vector<Value *> trargs;
trargs.push_back(threshold);
new CallInst(initialize, trargs, "", fr->begin());
}