1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Fine-grainify namespaces for this library

llvm-svn: 9948
This commit is contained in:
Chris Lattner 2003-11-12 23:11:14 +00:00
parent c270643f35
commit b60823472a
10 changed files with 14 additions and 36 deletions

View File

@ -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 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) {
//Graph.writeGraphToFile(std::cerr, "bu_" + F.getName());
}
} // End llvm namespace

View File

@ -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 @@ void DSGraph::computeNodeMapping(const DSNodeHandle &NH1,
if (unsigned(N2Idx)+i < N2Size)
computeNodeMapping(N1->getLink(i), N2->getLink(N2Idx+i), NodeMap);
}
} // End llvm namespace

View File

@ -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 @@ void DSAA::getMustAliases(Value *P, std::vector<Value*> &RetVals) {
return getAnalysis<AliasAnalysis>().getMustAliases(P, RetVals);
}
} // End llvm namespace

View File

@ -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 @@ bool DSOpt::OptimizeGlobals(Module &M) {
}
return Changed;
}
} // End llvm namespace

View File

@ -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 @@ bool DSGraphStats::runOnFunction(Function& F) {
visit(F);
return true;
}
} // End llvm namespace

View File

@ -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 @@ void DSGC::verify(const DSGraph &G) {
}
}
}
} // End llvm namespace

View File

@ -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 @@ namespace DS {
return Ty->getPrimitiveSize() >= PointerSize;
return false;
}
}
}}
using namespace DS;
@ -622,4 +623,3 @@ void LocalDataStructures::releaseMemory() {
GlobalsGraph = 0;
}
} // End llvm namespace

View File

@ -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 @@ static std::string getCaption(const DSNode *N, const DSGraph *G) {
return OS.str();
}
namespace llvm {
template<>
struct DOTGraphTraits<const DSGraph*> : public DefaultDOTGraphTraits {
static std::string getGraphName(const DSGraph *G) {
@ -179,6 +179,7 @@ struct DOTGraphTraits<const DSGraph*> : public DefaultDOTGraphTraits {
}
}
};
} // end namespace llvm
void DSNode::print(std::ostream &O, const DSGraph *G) const {
GraphWriter<const DSGraph *> W(O, G);
@ -282,4 +283,3 @@ void TDDataStructures::print(std::ostream &O, const Module *M) const {
printCollection(*this, O, M, "td.");
}
} // End llvm namespace

View File

@ -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 @@ AliasAnalysis::AliasResult Steens::alias(const Value *V1, unsigned V1Size,
//
return getAnalysis<AliasAnalysis>().alias(V1, V1Size, V2, V2Size);
}
} // End llvm namespace

View File

@ -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 @@ void TDDataStructures::inlineGraphIntoCallees(DSGraph &Graph) {
<< Graph.getFunctionNames() << " [" << Graph.getGraphSize() << "+"
<< Graph.getFunctionCalls().size() << "]\n");
}
} // End llvm namespace