[llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp EdgeCode.cpp Graph.cpp Graph.h GraphAuxiliary.cpp InstLoops.cpp ProfilePaths.cpp RetracePath.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Nov 11 16:42:01 PST 2003
Changes in directory llvm/lib/Transforms/Instrumentation/ProfilePaths:
CombineBranch.cpp updated: 1.5 -> 1.6
EdgeCode.cpp updated: 1.25 -> 1.26
Graph.cpp updated: 1.13 -> 1.14
Graph.h updated: 1.11 -> 1.12
GraphAuxiliary.cpp updated: 1.20 -> 1.21
InstLoops.cpp updated: 1.10 -> 1.11
ProfilePaths.cpp updated: 1.37 -> 1.38
RetracePath.cpp updated: 1.7 -> 1.8
---
Log message:
Put all LLVM code into the llvm namespace, as per bug 109.
---
Diffs of the changes: (+38 -3)
Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp
diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp:1.5 llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp:1.6
--- llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp:1.5 Mon Oct 20 14:43:19 2003
+++ llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp Tue Nov 11 16:41:33 2003
@@ -27,6 +27,8 @@
#include "llvm/Function.h"
#include "llvm/Pass.h"
+namespace llvm {
+
//this is used to color vertices
//during DFS
@@ -36,7 +38,7 @@
BLACK
};
-namespace{
+namespace {
struct CombineBranches : public FunctionPass {
private:
//DominatorSet *DS;
@@ -225,3 +227,5 @@
return true;
}
+
+} // End llvm namespace
Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp
diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp:1.25 llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp:1.26
--- llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp:1.25 Mon Oct 20 14:43:19 2003
+++ llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp Tue Nov 11 16:41:33 2003
@@ -27,8 +27,10 @@
#define INSERT_LOAD_COUNT
#define INSERT_STORE
+
using std::vector;
+namespace llvm {
static void getTriggerCode(Module *M, BasicBlock *BB, int MethNo, Value *pathNo,
Value *cnt, Instruction *rInst){
@@ -369,3 +371,4 @@
}
}
+} // End llvm namespace
Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp
diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp:1.13 llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp:1.14
--- llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp:1.13 Mon Oct 20 14:43:19 2003
+++ llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp Tue Nov 11 16:41:33 2003
@@ -19,6 +19,8 @@
using std::vector;
+namespace llvm {
+
const graphListElement *findNodeInList(const Graph::nodeList &NL,
Node *N) {
for(Graph::nodeList::const_iterator NI = NL.begin(), NE=NL.end(); NI != NE;
@@ -564,4 +566,4 @@
color[u]=BLACK;//done with visiting the node and its neighbors
}
-
+} // End llvm namespace
Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h
diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h:1.11 llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h:1.12
--- llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h:1.11 Wed Nov 5 00:12:18 2003
+++ llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h Tue Nov 11 16:41:33 2003
@@ -19,6 +19,8 @@
#include <map>
#include <cstdlib>
+namespace llvm {
+
class Module;
class Function;
@@ -112,8 +114,13 @@
}
};
+} // End llvm namespace
+
namespace std {
+
+using namespace llvm;
+
template<>
struct less<Node *> : public binary_function<Node *, Node *,bool> {
bool operator()(Node *n1, Node *n2) const {
@@ -135,6 +142,8 @@
};
}
+namespace llvm {
+
struct BBSort{
bool operator()(BasicBlock *BB1, BasicBlock *BB2) const{
std::string name1=BB1->getName();
@@ -465,6 +474,7 @@
std::vector<Edge> &be);
void getBBtrace(std::vector<BasicBlock *> &vBB, int pathNo, Function *M);
-#endif
+} // End llvm namespace
+#endif
Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp
diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp:1.20 llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp:1.21
--- llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp:1.20 Mon Oct 20 14:43:19 2003
+++ llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp Tue Nov 11 16:41:33 2003
@@ -24,6 +24,8 @@
using std::vector;
using std::cerr;
+namespace llvm {
+
//check if 2 edges are equal (same endpoints and same weight)
static bool edgesEqual(Edge ed1, Edge ed2){
return ((ed1==ed2) && ed1.getWeight()==ed2.getWeight());
@@ -673,3 +675,5 @@
}
cerr<<"--------------------Graph\n";
}
+
+} // End llvm namespace
Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp:1.10 llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp:1.11
--- llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp:1.10 Mon Oct 20 14:43:19 2003
+++ llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp Tue Nov 11 16:41:33 2003
@@ -27,6 +27,8 @@
#include "llvm/Function.h"
#include "llvm/Pass.h"
+namespace llvm {
+
//this is used to color vertices
//during DFS
@@ -181,3 +183,5 @@
findAndInstrumentBackEdges(F);
return true; // Function was modified.
}
+
+} // End llvm namespace
Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.37 llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.38
--- llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.37 Mon Oct 20 14:43:19 2003
+++ llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp Tue Nov 11 16:41:33 2003
@@ -43,6 +43,8 @@
#include <fstream>
#include <cstdio>
+namespace llvm {
+
struct ProfilePaths : public FunctionPass {
bool runOnFunction(Function &F);
@@ -245,3 +247,5 @@
return true; // Always modifies function
}
+
+} // End llvm namespace
Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp
diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp:1.7 llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp:1.8
--- llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp:1.7 Mon Oct 20 14:43:19 2003
+++ llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp Tue Nov 11 16:41:33 2003
@@ -21,6 +21,8 @@
using std::map;
using std::cerr;
+namespace llvm {
+
//Routines to get the path trace!
void getPathFrmNode(Node *n, vector<BasicBlock*> &vBB, int pathNo, Graph &g,
@@ -303,3 +305,5 @@
}
*/
}
+
+} // End llvm namespace
More information about the llvm-commits
mailing list