[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp DataStructure.cpp DataStructureAA.cpp DataStructureOpt.cpp DataStructureStats.cpp GraphChecker.cpp Local.cpp Printer.cpp Steensgaard.cpp TopDownClosure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Nov 12 17:12:01 PST 2003
Changes in directory llvm/lib/Analysis/DataStructure:
BottomUpClosure.cpp updated: 1.68 -> 1.69
DataStructure.cpp updated: 1.130 -> 1.131
DataStructureAA.cpp updated: 1.12 -> 1.13
DataStructureOpt.cpp updated: 1.4 -> 1.5
DataStructureStats.cpp updated: 1.9 -> 1.10
GraphChecker.cpp updated: 1.9 -> 1.10
Local.cpp updated: 1.70 -> 1.71
Printer.cpp updated: 1.60 -> 1.61
Steensgaard.cpp updated: 1.34 -> 1.35
TopDownClosure.cpp updated: 1.59 -> 1.60
---
Log message:
Fine-grainify namespaces for this library
---
Diffs of the changes: (+14 -36)
Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.68 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.69
--- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.68 Tue Nov 11 16:41:31 2003
+++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Wed Nov 12 17:11:14 2003
@@ -19,8 +19,7 @@
#include "Support/Statistic.h"
#include "Support/Debug.h"
#include "DSCallSiteIterator.h"
-
-namespace llvm {
+using namespace llvm;
namespace {
Statistic<> MaxSCC("budatastructure", "Maximum SCC Size in Call Graph");
@@ -317,5 +316,3 @@
//Graph.writeGraphToFile(std::cerr, "bu_" + F.getName());
}
-
-} // End llvm namespace
Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.130 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.131
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.130 Wed Nov 12 11:58:22 2003
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Wed Nov 12 17:11:14 2003
@@ -22,8 +22,7 @@
#include "Support/Statistic.h"
#include "Support/Timer.h"
#include <algorithm>
-
-namespace llvm {
+using namespace llvm;
namespace {
Statistic<> NumFolds ("dsnode", "Number of nodes completely folded");
@@ -1672,5 +1671,3 @@
if (unsigned(N2Idx)+i < N2Size)
computeNodeMapping(N1->getLink(i), N2->getLink(N2Idx+i), NodeMap);
}
-
-} // End llvm namespace
Index: llvm/lib/Analysis/DataStructure/DataStructureAA.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.12 llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.13
--- llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.12 Tue Nov 11 16:41:32 2003
+++ llvm/lib/Analysis/DataStructure/DataStructureAA.cpp Wed Nov 12 17:11:14 2003
@@ -16,8 +16,7 @@
#include "llvm/Analysis/DSGraph.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Module.h"
-
-namespace llvm {
+using namespace llvm;
namespace {
class DSAA : public Pass, public AliasAnalysis {
@@ -179,4 +178,3 @@
return getAnalysis<AliasAnalysis>().getMustAliases(P, RetVals);
}
-} // End llvm namespace
Index: llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp:1.4 llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp:1.5
--- llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp:1.4 Tue Nov 11 16:41:32 2003
+++ llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp Wed Nov 12 17:11:14 2003
@@ -17,8 +17,7 @@
#include "llvm/Module.h"
#include "llvm/Constant.h"
#include "Support/Statistic.h"
-
-namespace llvm {
+using namespace llvm;
namespace {
Statistic<>
@@ -97,5 +96,3 @@
}
return Changed;
}
-
-} // End llvm namespace
Index: llvm/lib/Analysis/DataStructure/DataStructureStats.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.9 llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.10
--- llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.9 Tue Nov 11 16:41:32 2003
+++ llvm/lib/Analysis/DataStructure/DataStructureStats.cpp Wed Nov 12 17:11:14 2003
@@ -18,8 +18,7 @@
#include "llvm/Support/InstVisitor.h"
#include "Support/Statistic.h"
#include <vector>
-
-namespace llvm {
+using namespace llvm;
namespace {
Statistic<> TotalNumCallees("totalcallees",
@@ -141,5 +140,3 @@
visit(F);
return true;
}
-
-} // End llvm namespace
Index: llvm/lib/Analysis/DataStructure/GraphChecker.cpp
diff -u llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.9 llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.10
--- llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.9 Tue Nov 11 16:41:32 2003
+++ llvm/lib/Analysis/DataStructure/GraphChecker.cpp Wed Nov 12 17:11:14 2003
@@ -29,7 +29,7 @@
#include "llvm/Value.h"
#include <set>
-namespace llvm {
+using namespace llvm;
namespace {
enum DSPass { local, bu, td };
@@ -195,5 +195,3 @@
}
}
}
-
-} // End llvm namespace
Index: llvm/lib/Analysis/DataStructure/Local.cpp
diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.70 llvm/lib/Analysis/DataStructure/Local.cpp:1.71
--- llvm/lib/Analysis/DataStructure/Local.cpp:1.70 Tue Nov 11 16:41:32 2003
+++ llvm/lib/Analysis/DataStructure/Local.cpp Wed Nov 12 17:11:14 2003
@@ -28,11 +28,12 @@
//
#include "llvm/Module.h"
-namespace llvm {
+using namespace llvm;
static RegisterAnalysis<LocalDataStructures>
X("datastructure", "Local Data Structure Analysis");
+namespace llvm {
namespace DS {
// isPointerType - Return true if this type is big enough to hold a pointer.
bool isPointerType(const Type *Ty) {
@@ -42,7 +43,7 @@
return Ty->getPrimitiveSize() >= PointerSize;
return false;
}
-}
+}}
using namespace DS;
@@ -622,4 +623,3 @@
GlobalsGraph = 0;
}
-} // End llvm namespace
Index: llvm/lib/Analysis/DataStructure/Printer.cpp
diff -u llvm/lib/Analysis/DataStructure/Printer.cpp:1.60 llvm/lib/Analysis/DataStructure/Printer.cpp:1.61
--- llvm/lib/Analysis/DataStructure/Printer.cpp:1.60 Tue Nov 11 22:58:19 2003
+++ llvm/lib/Analysis/DataStructure/Printer.cpp Wed Nov 12 17:11:14 2003
@@ -22,8 +22,7 @@
#include "Support/Statistic.h"
#include <fstream>
#include <sstream>
-
-namespace llvm {
+using namespace llvm;
// OnlyPrintMain - The DataStructure printer exposes this option to allow
// printing of only the graph for "main".
@@ -73,6 +72,7 @@
return OS.str();
}
+namespace llvm {
template<>
struct DOTGraphTraits<const DSGraph*> : public DefaultDOTGraphTraits {
static std::string getGraphName(const DSGraph *G) {
@@ -179,6 +179,7 @@
}
}
};
+} // end namespace llvm
void DSNode::print(std::ostream &O, const DSGraph *G) const {
GraphWriter<const DSGraph *> W(O, G);
@@ -282,4 +283,3 @@
printCollection(*this, O, M, "td.");
}
-} // End llvm namespace
Index: llvm/lib/Analysis/DataStructure/Steensgaard.cpp
diff -u llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.34 llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.35
--- llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.34 Tue Nov 11 16:41:32 2003
+++ llvm/lib/Analysis/DataStructure/Steensgaard.cpp Wed Nov 12 17:11:14 2003
@@ -19,8 +19,7 @@
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Module.h"
#include "Support/Debug.h"
-
-namespace llvm {
+using namespace llvm;
namespace {
class Steens : public Pass, public AliasAnalysis {
@@ -236,5 +235,3 @@
//
return getAnalysis<AliasAnalysis>().alias(V1, V1Size, V2, V2Size);
}
-
-} // End llvm namespace
Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.59 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.60
--- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.59 Tue Nov 11 16:41:32 2003
+++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Wed Nov 12 17:11:14 2003
@@ -20,8 +20,7 @@
#include "llvm/Analysis/DSGraph.h"
#include "Support/Debug.h"
#include "Support/Statistic.h"
-
-namespace llvm {
+using namespace llvm;
namespace {
RegisterAnalysis<TDDataStructures> // Register the pass
@@ -311,5 +310,3 @@
<< Graph.getFunctionNames() << " [" << Graph.getGraphSize() << "+"
<< Graph.getFunctionCalls().size() << "]\n");
}
-
-} // End llvm namespace
More information about the llvm-commits
mailing list