'Pass' should now not be derived from by clients.  Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp
index 4bc6faf..bf4b01c 100644
--- a/lib/Analysis/DataStructure/BottomUpClosure.cpp
+++ b/lib/Analysis/DataStructure/BottomUpClosure.cpp
@@ -35,7 +35,7 @@
 // run - Calculate the bottom up data structure graphs for each function in the
 // program.
 //
-bool BUDataStructures::run(Module &M) {
+bool BUDataStructures::runOnModule(Module &M) {
   LocalDataStructures &LocalDSA = getAnalysis<LocalDataStructures>();
   GlobalsGraph = new DSGraph(LocalDSA.getGlobalsGraph());
   GlobalsGraph->setPrintAuxCalls();
diff --git a/lib/Analysis/DataStructure/CompleteBottomUp.cpp b/lib/Analysis/DataStructure/CompleteBottomUp.cpp
index b2a0f4b..ee111e9 100644
--- a/lib/Analysis/DataStructure/CompleteBottomUp.cpp
+++ b/lib/Analysis/DataStructure/CompleteBottomUp.cpp
@@ -32,7 +32,7 @@
 // run - Calculate the bottom up data structure graphs for each function in the
 // program.
 //
-bool CompleteBUDataStructures::run(Module &M) {
+bool CompleteBUDataStructures::runOnModule(Module &M) {
   BUDataStructures &BU = getAnalysis<BUDataStructures>();
   GlobalsGraph = new DSGraph(BU.getGlobalsGraph());
   GlobalsGraph->setPrintAuxCalls();
diff --git a/lib/Analysis/DataStructure/DataStructureAA.cpp b/lib/Analysis/DataStructure/DataStructureAA.cpp
index 3cff795..6444cc8 100644
--- a/lib/Analysis/DataStructure/DataStructureAA.cpp
+++ b/lib/Analysis/DataStructure/DataStructureAA.cpp
@@ -19,7 +19,7 @@
 using namespace llvm;
 
 namespace {
-  class DSAA : public Pass, public AliasAnalysis {
+  class DSAA : public ModulePass, public AliasAnalysis {
     TDDataStructures *TD;
     BUDataStructures *BU;
   public:
@@ -32,7 +32,7 @@
     // run - Build up the result graph, representing the pointer graph for the
     // program.
     //
-    bool run(Module &M) {
+    bool runOnModule(Module &M) {
       InitializeAliasAnalysis(this);
       TD = &getAnalysis<TDDataStructures>();
       BU = &getAnalysis<BUDataStructures>();
diff --git a/lib/Analysis/DataStructure/DataStructureOpt.cpp b/lib/Analysis/DataStructure/DataStructureOpt.cpp
index f7a1ed9..1996aea 100644
--- a/lib/Analysis/DataStructure/DataStructureOpt.cpp
+++ b/lib/Analysis/DataStructure/DataStructureOpt.cpp
@@ -25,10 +25,10 @@
   Statistic<>
   NumGlobalsIsolated("ds-opt", "Number of globals with references dropped");
 
-  class DSOpt : public Pass {
+  class DSOpt : public ModulePass {
     TDDataStructures *TD;
   public:
-    bool run(Module &M) {
+    bool runOnModule(Module &M) {
       TD = &getAnalysis<TDDataStructures>();
       bool Changed = OptimizeGlobals(M);
       return Changed;
diff --git a/lib/Analysis/DataStructure/IPModRef.cpp b/lib/Analysis/DataStructure/IPModRef.cpp
index ccc15f7..6793b0e 100644
--- a/lib/Analysis/DataStructure/IPModRef.cpp
+++ b/lib/Analysis/DataStructure/IPModRef.cpp
@@ -374,7 +374,7 @@
 // NO real interprocedural work because all that has been done the
 // data structure analysis.
 // 
-bool IPModRef::run(Module &theModule)
+bool IPModRef::runOnModule(Module &theModule)
 {
   M = &theModule;
 
diff --git a/lib/Analysis/DataStructure/IPModRef.h b/lib/Analysis/DataStructure/IPModRef.h
index 4a825db..f8ac15c 100644
--- a/lib/Analysis/DataStructure/IPModRef.h
+++ b/lib/Analysis/DataStructure/IPModRef.h
@@ -183,7 +183,7 @@
 /// from an arbitrary callsite, or during an execution of a single call-site
 /// within the function.
 ///
-class IPModRef : public Pass {
+class IPModRef : public ModulePass {
   std::map<const Function*, FunctionModRefInfo*> funcToModRefInfoMap;
   Module* M;
 
@@ -197,7 +197,7 @@
   /// This initializes the module reference, and then computes IPModRef
   /// results immediately if demand-driven analysis was *not* specified.
   /// 
-  virtual bool run(Module &M);
+  virtual bool runOnModule(Module &M);
 
   /// getFunctionModRefInfo - Retrieve the Mod/Ref information for a single
   /// function
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index b21f2f1..070d037 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -1023,7 +1023,7 @@
 }
 
 
-bool LocalDataStructures::run(Module &M) {
+bool LocalDataStructures::runOnModule(Module &M) {
   GlobalsGraph = new DSGraph(getAnalysis<TargetData>());
 
   const TargetData &TD = getAnalysis<TargetData>();
diff --git a/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp b/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp
index 49b6425..f6c54fb 100644
--- a/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp
+++ b/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp
@@ -457,7 +457,7 @@
 // Driver function to compute dependence graphs for every function.
 // This is temporary and will go away once this is a FunctionPass.
 // 
-bool MemoryDepAnalysis::run(Module& M)
+bool MemoryDepAnalysis::runOnModule(Module& M)
 {
   for (Module::iterator FI = M.begin(), FE = M.end(); FI != FE; ++FI)
     if (! FI->isExternal())
diff --git a/lib/Analysis/DataStructure/MemoryDepAnalysis.h b/lib/Analysis/DataStructure/MemoryDepAnalysis.h
index 570a03b..ed21e5f 100644
--- a/lib/Analysis/DataStructure/MemoryDepAnalysis.h
+++ b/lib/Analysis/DataStructure/MemoryDepAnalysis.h
@@ -40,7 +40,7 @@
 /// allowed to use a FunctionPass such as this one.
 ///---------------------------------------------------------------------------
 
-class MemoryDepAnalysis : public Pass {
+class MemoryDepAnalysis : public ModulePass {
   /// The following map and depGraph pointer are temporary until this class
   /// becomes a FunctionPass instead of a module Pass.
   hash_map<Function*, DependenceGraph*> funcMap;
@@ -63,7 +63,7 @@
 
   /// Driver function to compute dependence graphs for every function.
   ///
-  bool run(Module &M);
+  bool runOnModule(Module &M);
 
   /// getGraph - Retrieve the dependence graph for a function.
   /// This is temporary and will go away once this is a FunctionPass.
diff --git a/lib/Analysis/DataStructure/Parallelize.cpp b/lib/Analysis/DataStructure/Parallelize.cpp
index 3dcb05e..2bb6c7f 100644
--- a/lib/Analysis/DataStructure/Parallelize.cpp
+++ b/lib/Analysis/DataStructure/Parallelize.cpp
@@ -388,11 +388,11 @@
 //---------------------------------------------------------------------------- 
 
 namespace {
-  class Parallelize: public Pass {
+  class Parallelize : public ModulePass {
   public:
     /// Driver functions to transform a program
     ///
-    bool run(Module& M);
+    bool runOnModule(Module& M);
 
     /// getAnalysisUsage - Modifies extensively so preserve nothing.
     /// Uses the DependenceGraph and the Top-down DS Graph (only to find
@@ -409,7 +409,7 @@
 }
 
 
-bool Parallelize::run(Module& M) {
+bool Parallelize::runOnModule(Module& M) {
   hash_set<Function*> parallelFunctions;
   hash_set<Function*> safeParallelFunctions;
   hash_set<const GlobalValue*> indirectlyCalled;
diff --git a/lib/Analysis/DataStructure/PgmDependenceGraph.h b/lib/Analysis/DataStructure/PgmDependenceGraph.h
index ec6f927..d777494 100644
--- a/lib/Analysis/DataStructure/PgmDependenceGraph.h
+++ b/lib/Analysis/DataStructure/PgmDependenceGraph.h
@@ -200,7 +200,7 @@
 /// allowed to use a FunctionPass such as this one.
 ///---------------------------------------------------------------------------
 
-class PgmDependenceGraph: public Pass {
+class PgmDependenceGraph: public ModulePass {
 
   /// Information about the function being analyzed.
   /// 
@@ -253,7 +253,7 @@
 
   /// Driver function to compute dependence graphs for every function.
   /// 
-  bool run(Module& M) { return true; }
+  bool runOnModule(Module& M) { return true; }
 
   /// getGraph() -- Retrieve the pgm dependence graph for a function.
   /// This is temporary and will go away once this is a FunctionPass.
diff --git a/lib/Analysis/DataStructure/Steensgaard.cpp b/lib/Analysis/DataStructure/Steensgaard.cpp
index deeb8b3..b0718a1 100644
--- a/lib/Analysis/DataStructure/Steensgaard.cpp
+++ b/lib/Analysis/DataStructure/Steensgaard.cpp
@@ -22,7 +22,7 @@
 using namespace llvm;
 
 namespace {
-  class Steens : public Pass, public AliasAnalysis {
+  class Steens : public ModulePass, public AliasAnalysis {
     DSGraph *ResultGraph;
     DSGraph *GlobalsGraph;  // FIXME: Eliminate globals graph stuff from DNE
   public:
@@ -39,7 +39,7 @@
     // run - Build up the result graph, representing the pointer graph for the
     // program.
     //
-    bool run(Module &M);
+    bool runOnModule(Module &M);
 
     virtual void releaseMyMemory() { delete ResultGraph; ResultGraph = 0; }
 
@@ -103,7 +103,7 @@
 /// run - Build up the result graph, representing the pointer graph for the
 /// program.
 ///
-bool Steens::run(Module &M) {
+bool Steens::runOnModule(Module &M) {
   InitializeAliasAnalysis(this);
   assert(ResultGraph == 0 && "Result graph already allocated!");
   LocalDataStructures &LDS = getAnalysis<LocalDataStructures>();
diff --git a/lib/Analysis/DataStructure/TopDownClosure.cpp b/lib/Analysis/DataStructure/TopDownClosure.cpp
index 1d861e8..6271980 100644
--- a/lib/Analysis/DataStructure/TopDownClosure.cpp
+++ b/lib/Analysis/DataStructure/TopDownClosure.cpp
@@ -51,7 +51,7 @@
 // run - Calculate the top down data structure graphs for each function in the
 // program.
 //
-bool TDDataStructures::run(Module &M) {
+bool TDDataStructures::runOnModule(Module &M) {
   BUDataStructures &BU = getAnalysis<BUDataStructures>();
   GlobalsGraph = new DSGraph(BU.getGlobalsGraph());
   GlobalsGraph->setPrintAuxCalls();