eliminate RegisterOpt.  It does the same thing as RegisterPass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp
index 960e36b..5183d43 100644
--- a/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -72,8 +72,8 @@
     Function *DoPromotion(Function *F, std::vector<Argument*> &ArgsToPromote);
   };
 
-  RegisterOpt<ArgPromotion> X("argpromotion",
-                              "Promote 'by reference' arguments to scalars");
+  RegisterPass<ArgPromotion> X("argpromotion",
+                               "Promote 'by reference' arguments to scalars");
 }
 
 ModulePass *llvm::createArgumentPromotionPass() {
diff --git a/lib/Transforms/IPO/ConstantMerge.cpp b/lib/Transforms/IPO/ConstantMerge.cpp
index 220d0d8..aca42fe 100644
--- a/lib/Transforms/IPO/ConstantMerge.cpp
+++ b/lib/Transforms/IPO/ConstantMerge.cpp
@@ -33,7 +33,7 @@
     bool runOnModule(Module &M);
   };
 
-  RegisterOpt<ConstantMerge> X("constmerge","Merge Duplicate Global Constants");
+  RegisterPass<ConstantMerge>X("constmerge","Merge Duplicate Global Constants");
 }
 
 ModulePass *llvm::createConstantMergePass() { return new ConstantMerge(); }
diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp
index e1feed9..08d92a5 100644
--- a/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -93,7 +93,7 @@
 
     void RemoveDeadArgumentsFromFunction(Function *F);
   };
-  RegisterOpt<DAE> X("deadargelim", "Dead Argument Elimination");
+  RegisterPass<DAE> X("deadargelim", "Dead Argument Elimination");
 
   /// DAH - DeadArgumentHacking pass - Same as dead argument elimination, but
   /// deletes arguments to functions which are external.  This is only for use
diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp
index 005d6bd..57e5fa3 100644
--- a/lib/Transforms/IPO/DeadTypeElimination.cpp
+++ b/lib/Transforms/IPO/DeadTypeElimination.cpp
@@ -36,7 +36,7 @@
       AU.addRequired<FindUsedTypes>();
     }
   };
-  RegisterOpt<DTE> X("deadtypeelim", "Dead Type Elimination");
+  RegisterPass<DTE> X("deadtypeelim", "Dead Type Elimination");
   Statistic<>
   NumKilled("deadtypeelim", "Number of unused typenames removed from symtab");
 }
diff --git a/lib/Transforms/IPO/FunctionResolution.cpp b/lib/Transforms/IPO/FunctionResolution.cpp
index d8b1a86..a514b92 100644
--- a/lib/Transforms/IPO/FunctionResolution.cpp
+++ b/lib/Transforms/IPO/FunctionResolution.cpp
@@ -43,7 +43,7 @@
 
     bool runOnModule(Module &M);
   };
-  RegisterOpt<FunctionResolvingPass> X("funcresolve", "Resolve Functions");
+  RegisterPass<FunctionResolvingPass> X("funcresolve", "Resolve Functions");
 }
 
 ModulePass *llvm::createFunctionResolvingPass() {
@@ -314,7 +314,8 @@
       Globals[F->getName()].push_back(F);
   }
 
-  for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ) {
+  for (Module::global_iterator I = M.global_begin(), E = M.global_end();
+       I != E; ) {
     GlobalVariable *GV = I++;
     if (GV->use_empty() && GV->isExternal()) {
       M.getGlobalList().erase(GV);
@@ -346,7 +347,8 @@
       ++I;
     }
 
-  for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; )
+  for (Module::global_iterator I = M.global_begin(), E = M.global_end();
+       I != E; )
     if (I->isExternal() && I->use_empty()) {
       GlobalVariable *GV = I;
       ++I;
diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp
index 072cef2..07296cf 100644
--- a/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/lib/Transforms/IPO/GlobalDCE.cpp
@@ -44,7 +44,7 @@
     bool SafeToDestroyConstant(Constant* C);
     bool RemoveUnusedGlobalValue(GlobalValue &GV);
   };
-  RegisterOpt<GlobalDCE> X("globaldce", "Dead Global Elimination");
+  RegisterPass<GlobalDCE> X("globaldce", "Dead Global Elimination");
 }
 
 ModulePass *llvm::createGlobalDCEPass() { return new GlobalDCE(); }
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp
index 0521779..8324b43 100644
--- a/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/lib/Transforms/IPO/GlobalOpt.cpp
@@ -60,10 +60,10 @@
     bool OptimizeFunctions(Module &M);
     bool OptimizeGlobalVars(Module &M);
     bool OptimizeGlobalCtorsList(GlobalVariable *&GCL);
-    bool ProcessInternalGlobal(GlobalVariable *GV, Module::global_iterator &GVI);
+    bool ProcessInternalGlobal(GlobalVariable *GV,Module::global_iterator &GVI);
   };
 
-  RegisterOpt<GlobalOpt> X("globalopt", "Global Variable Optimizer");
+  RegisterPass<GlobalOpt> X("globalopt", "Global Variable Optimizer");
 }
 
 ModulePass *llvm::createGlobalOptimizerPass() { return new GlobalOpt(); }
@@ -800,7 +800,8 @@
 // OptimizeOnceStoredGlobal - Try to optimize globals based on the knowledge
 // that only one value (besides its initializer) is ever stored to the global.
 static bool OptimizeOnceStoredGlobal(GlobalVariable *GV, Value *StoredOnceVal,
-                                     Module::global_iterator &GVI, TargetData &TD) {
+                                     Module::global_iterator &GVI,
+                                     TargetData &TD) {
   if (CastInst *CI = dyn_cast<CastInst>(StoredOnceVal))
     StoredOnceVal = CI->getOperand(0);
   else if (GetElementPtrInst *GEPI =dyn_cast<GetElementPtrInst>(StoredOnceVal)){
diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp
index 02395b5..4713fb6 100644
--- a/lib/Transforms/IPO/IPConstantPropagation.cpp
+++ b/lib/Transforms/IPO/IPConstantPropagation.cpp
@@ -28,7 +28,7 @@
   Statistic<> NumArgumentsProped("ipconstprop",
                                  "Number of args turned into constants");
   Statistic<> NumReturnValProped("ipconstprop",
-                                 "Number of return values turned into constants");
+                              "Number of return values turned into constants");
 
   /// IPCP - The interprocedural constant propagation pass
   ///
@@ -38,7 +38,7 @@
     bool PropagateConstantsIntoArguments(Function &F);
     bool PropagateConstantReturn(Function &F);
   };
-  RegisterOpt<IPCP> X("ipconstprop", "Interprocedural constant propagation");
+  RegisterPass<IPCP> X("ipconstprop", "Interprocedural constant propagation");
 }
 
 ModulePass *llvm::createIPConstantPropagationPass() { return new IPCP(); }
@@ -69,7 +69,7 @@
 /// constant in for an argument, propagate that constant in as the argument.
 ///
 bool IPCP::PropagateConstantsIntoArguments(Function &F) {
-  if (F.arg_empty() || F.use_empty()) return false;  // No arguments?  Early exit.
+  if (F.arg_empty() || F.use_empty()) return false; // No arguments? Early exit.
 
   std::vector<std::pair<Constant*, bool> > ArgumentConstants;
   ArgumentConstants.resize(F.arg_size());
diff --git a/lib/Transforms/IPO/IndMemRemoval.cpp b/lib/Transforms/IPO/IndMemRemoval.cpp
index b5d0195..78b6ea5 100644
--- a/lib/Transforms/IPO/IndMemRemoval.cpp
+++ b/lib/Transforms/IPO/IndMemRemoval.cpp
@@ -38,7 +38,7 @@
     IndMemRemPass();
     virtual bool runOnModule(Module &M);
   };
-  RegisterOpt<IndMemRemPass> X("indmemrem", "Indirect Malloc and Free Removal");
+  RegisterPass<IndMemRemPass> X("indmemrem","Indirect Malloc and Free Removal");
 } // end anonymous namespace
 
 
diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp
index 4a41bb6..6436684 100644
--- a/lib/Transforms/IPO/InlineSimple.cpp
+++ b/lib/Transforms/IPO/InlineSimple.cpp
@@ -55,7 +55,7 @@
   public:
     int getInlineCost(CallSite CS);
   };
-  RegisterOpt<SimpleInliner> X("inline", "Function Integration/Inlining");
+  RegisterPass<SimpleInliner> X("inline", "Function Integration/Inlining");
 }
 
 ModulePass *llvm::createFunctionInliningPass() { return new SimpleInliner(); }
diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp
index f1e1e9c..2eec95f 100644
--- a/lib/Transforms/IPO/Internalize.cpp
+++ b/lib/Transforms/IPO/Internalize.cpp
@@ -49,7 +49,7 @@
     void LoadFile(const char *Filename);
     virtual bool runOnModule(Module &M);
   };
-  RegisterOpt<InternalizePass> X("internalize", "Internalize Global Symbols");
+  RegisterPass<InternalizePass> X("internalize", "Internalize Global Symbols");
 } // end anonymous namespace
 
 InternalizePass::InternalizePass(bool InternalizeEverything) 
diff --git a/lib/Transforms/IPO/LoopExtractor.cpp b/lib/Transforms/IPO/LoopExtractor.cpp
index 39d0fca..a4ce585 100644
--- a/lib/Transforms/IPO/LoopExtractor.cpp
+++ b/lib/Transforms/IPO/LoopExtractor.cpp
@@ -46,7 +46,7 @@
     }
   };
 
-  RegisterOpt<LoopExtractor>
+  RegisterPass<LoopExtractor>
   X("loop-extract", "Extract loops into new functions");
 
   /// SingleLoopExtractor - For bugpoint.
@@ -54,7 +54,7 @@
     SingleLoopExtractor() : LoopExtractor(1) {}
   };
 
-  RegisterOpt<SingleLoopExtractor>
+  RegisterPass<SingleLoopExtractor>
   Y("loop-extract-single", "Extract at most one loop into a new function");
 } // End anonymous namespace
 
@@ -148,7 +148,7 @@
 
     bool runOnModule(Module &M);
   };
-  RegisterOpt<BlockExtractorPass>
+  RegisterPass<BlockExtractorPass>
   XX("extract-blocks", "Extract Basic Blocks From Module (for bugpoint use)");
 }
 
diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp
index 9dd9501..8018553 100644
--- a/lib/Transforms/IPO/LowerSetJmp.cpp
+++ b/lib/Transforms/IPO/LowerSetJmp.cpp
@@ -120,7 +120,7 @@
     bool doInitialization(Module& M);
   };
 
-  RegisterOpt<LowerSetJmp> X("lowersetjmp", "Lower Set Jump");
+  RegisterPass<LowerSetJmp> X("lowersetjmp", "Lower Set Jump");
 } // end anonymous namespace
 
 // run - Run the transformation on the program. We grab the function
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp
index d536965..8ba0ac0 100644
--- a/lib/Transforms/IPO/PruneEH.cpp
+++ b/lib/Transforms/IPO/PruneEH.cpp
@@ -46,7 +46,7 @@
     bool SimplifyFunction(Function *F);
     void DeleteBasicBlock(BasicBlock *BB);
   };
-  RegisterOpt<PruneEH> X("prune-eh", "Remove unused exception handling info");
+  RegisterPass<PruneEH> X("prune-eh", "Remove unused exception handling info");
 }
 
 ModulePass *llvm::createPruneEHPass() { return new PruneEH(); }
diff --git a/lib/Transforms/IPO/RaiseAllocations.cpp b/lib/Transforms/IPO/RaiseAllocations.cpp
index 2b487d0..188b7f5 100644
--- a/lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/lib/Transforms/IPO/RaiseAllocations.cpp
@@ -44,7 +44,7 @@
     bool runOnModule(Module &M);
   };
 
-  RegisterOpt<RaiseAllocations>
+  RegisterPass<RaiseAllocations>
   X("raiseallocs", "Raise allocations from calls to instructions");
 }  // end anonymous namespace
 
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp
index d8415d7..79cdf28 100644
--- a/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp
@@ -366,8 +366,8 @@
 };
 
 // Register the pass
-RegisterOpt<SimplifyLibCalls>
-X("simplify-libcalls","Simplify well-known library calls");
+RegisterPass<SimplifyLibCalls>
+X("simplify-libcalls", "Simplify well-known library calls");
 
 } // anonymous namespace
 
diff --git a/lib/Transforms/IPO/StripSymbols.cpp b/lib/Transforms/IPO/StripSymbols.cpp
index da5e8a4..75b24a7 100644
--- a/lib/Transforms/IPO/StripSymbols.cpp
+++ b/lib/Transforms/IPO/StripSymbols.cpp
@@ -43,7 +43,7 @@
       AU.setPreservesAll();
     }
   };
-  RegisterOpt<StripSymbols> X("strip", "Strip all symbols from a module");
+  RegisterPass<StripSymbols> X("strip", "Strip all symbols from a module");
 }
 
 ModulePass *llvm::createStripSymbolsPass(bool OnlyDebugInfo) {
@@ -75,7 +75,8 @@
   // If we're not just stripping debug info, strip all symbols from the
   // functions and the names from any internal globals.
   if (!OnlyDebugInfo) {
-    for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I)
+    for (Module::global_iterator I = M.global_begin(), E = M.global_end();
+         I != E; ++I)
       if (I->hasInternalLinkage())
         I->setName("");     // Internal symbols can't participate in linkage