aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/IPA
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/IPA')
-rw-r--r--lib/Analysis/IPA/CallGraph.cpp4
-rw-r--r--lib/Analysis/IPA/CallGraphSCCPass.cpp4
-rw-r--r--lib/Analysis/IPA/DependenceGraph.cpp3
-rw-r--r--lib/Analysis/IPA/FindUnsafePointerTypes.cpp4
-rw-r--r--lib/Analysis/IPA/FindUsedTypes.cpp4
-rw-r--r--lib/Analysis/IPA/IPModRef.cpp4
-rw-r--r--lib/Analysis/IPA/MemoryDepAnalysis.cpp5
-rw-r--r--lib/Analysis/IPA/PgmDependenceGraph.cpp3
-rw-r--r--lib/Analysis/IPA/PrintSCC.cpp4
9 files changed, 34 insertions, 1 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp
index 8d44242..506198c 100644
--- a/lib/Analysis/IPA/CallGraph.cpp
+++ b/lib/Analysis/IPA/CallGraph.cpp
@@ -53,6 +53,8 @@
#include "llvm/Support/CallSite.h"
#include "Support/STLExtras.h"
+namespace llvm {
+
static RegisterAnalysis<CallGraph> X("callgraph", "Call Graph Construction");
static const char * const KnownExternalFunctions[] = {
@@ -349,3 +351,5 @@ Function *CallGraph::removeFunctionFromModule(CallGraphNode *CGN) {
}
void CallGraph::stub() {}
+
+} // End llvm namespace
diff --git a/lib/Analysis/IPA/CallGraphSCCPass.cpp b/lib/Analysis/IPA/CallGraphSCCPass.cpp
index 74da701..e9ab650 100644
--- a/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/lib/Analysis/IPA/CallGraphSCCPass.cpp
@@ -19,6 +19,8 @@
#include "llvm/Analysis/CallGraph.h"
#include "Support/SCCIterator.h"
+namespace llvm {
+
/// getAnalysisUsage - For this class, we declare that we require and preserve
/// the call graph. If the derived class implements this method, it should
/// always explicitly call the implementation here.
@@ -35,3 +37,5 @@ bool CallGraphSCCPass::run(Module &M) {
Changed = runOnSCC(*I);
return Changed;
}
+
+} // End llvm namespace
diff --git a/lib/Analysis/IPA/DependenceGraph.cpp b/lib/Analysis/IPA/DependenceGraph.cpp
index ead777a..7d62ef0 100644
--- a/lib/Analysis/IPA/DependenceGraph.cpp
+++ b/lib/Analysis/IPA/DependenceGraph.cpp
@@ -24,6 +24,7 @@
#include "llvm/Analysis/DependenceGraph.h"
#include "llvm/Function.h"
+namespace llvm {
//----------------------------------------------------------------------------
// class Dependence:
@@ -82,3 +83,5 @@ void DependenceGraph::print(const Function& func, std::ostream &O) const
if (const DepGraphNode* dgNode = this->getNode(*II))
dgNode->print(O);
}
+
+} // End llvm namespace
diff --git a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
index 7eeff7d..45f5b72 100644
--- a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
+++ b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
@@ -30,6 +30,8 @@
#include "llvm/Support/InstIterator.h"
#include "Support/CommandLine.h"
+namespace llvm {
+
static RegisterAnalysis<FindUnsafePointerTypes>
X("unsafepointertypes", "Find Unsafe Pointer Types");
@@ -99,3 +101,5 @@ void FindUnsafePointerTypes::print(std::ostream &o, const Module *M) const {
CW << " #" << Counter << ". " << (Value*)*I << "\n";
}
}
+
+} // End llvm namespace
diff --git a/lib/Analysis/IPA/FindUsedTypes.cpp b/lib/Analysis/IPA/FindUsedTypes.cpp
index 80bf378..e930499 100644
--- a/lib/Analysis/IPA/FindUsedTypes.cpp
+++ b/lib/Analysis/IPA/FindUsedTypes.cpp
@@ -21,6 +21,8 @@
#include "llvm/Assembly/CachedWriter.h"
#include "llvm/Support/InstIterator.h"
+namespace llvm {
+
static RegisterAnalysis<FindUsedTypes>
X("printusedtypes", "Find Used Types");
@@ -106,3 +108,5 @@ void FindUsedTypes::print(std::ostream &o, const Module *M) const {
E = UsedTypes.end(); I != E; ++I)
o << " " << *I << "\n";
}
+
+} // End llvm namespace
diff --git a/lib/Analysis/IPA/IPModRef.cpp b/lib/Analysis/IPA/IPModRef.cpp
index 64b60d4..01b5bd0 100644
--- a/lib/Analysis/IPA/IPModRef.cpp
+++ b/lib/Analysis/IPA/IPModRef.cpp
@@ -23,6 +23,8 @@
#include "Support/StringExtras.h"
#include <vector>
+namespace llvm {
+
//----------------------------------------------------------------------------
// Private constants and data
//----------------------------------------------------------------------------
@@ -441,3 +443,5 @@ void IPModRef::dump() const
{
print(std::cerr);
}
+
+} // End llvm namespace
diff --git a/lib/Analysis/IPA/MemoryDepAnalysis.cpp b/lib/Analysis/IPA/MemoryDepAnalysis.cpp
index 076836a..e61c076 100644
--- a/lib/Analysis/IPA/MemoryDepAnalysis.cpp
+++ b/lib/Analysis/IPA/MemoryDepAnalysis.cpp
@@ -31,6 +31,7 @@
#include "Support/hash_map"
#include "Support/hash_set"
+namespace llvm {
///--------------------------------------------------------------------------
/// struct ModRefTable:
@@ -122,7 +123,7 @@ struct ModRefTable {
class ModRefInfoBuilder : public InstVisitor<ModRefInfoBuilder> {
const DSGraph& funcGraph;
const FunctionModRefInfo& funcModRef;
- ModRefTable& modRefTable;
+ struct ModRefTable& modRefTable;
ModRefInfoBuilder(); // DO NOT IMPLEMENT
ModRefInfoBuilder(const ModRefInfoBuilder&); // DO NOT IMPLEMENT
@@ -498,3 +499,5 @@ void MemoryDepAnalysis::dump() const
static RegisterAnalysis<MemoryDepAnalysis>
Z("memdep", "Memory Dependence Analysis");
+
+} // End llvm namespace
diff --git a/lib/Analysis/IPA/PgmDependenceGraph.cpp b/lib/Analysis/IPA/PgmDependenceGraph.cpp
index ef44cb3..b861c89 100644
--- a/lib/Analysis/IPA/PgmDependenceGraph.cpp
+++ b/lib/Analysis/IPA/PgmDependenceGraph.cpp
@@ -30,6 +30,7 @@
#include "llvm/Analysis/PostDominators.h"
#include "llvm/Function.h"
+namespace llvm {
//----------------------------------------------------------------------------
// class DepIterState
@@ -253,3 +254,5 @@ void PgmDependenceGraph::dump() const
static RegisterAnalysis<PgmDependenceGraph>
Z("pgmdep", "Enumerate Program Dependence Graph (data and control)");
+
+} // End llvm namespace
diff --git a/lib/Analysis/IPA/PrintSCC.cpp b/lib/Analysis/IPA/PrintSCC.cpp
index 3459381..ce89fff 100644
--- a/lib/Analysis/IPA/PrintSCC.cpp
+++ b/lib/Analysis/IPA/PrintSCC.cpp
@@ -31,6 +31,8 @@
#include "llvm/Support/CFG.h"
#include "Support/SCCIterator.h"
+namespace llvm {
+
namespace {
struct CFGSCC : public FunctionPass {
bool runOnFunction(Function& func);
@@ -101,3 +103,5 @@ bool CallGraphSCC::run(Module &M) {
return true;
}
+
+} // End llvm namespace