eliminate RegisterOpt. It does the same thing as RegisterPass.
authorChris Lattner <sabre@nondot.org>
Sun, 27 Aug 2006 22:42:52 +0000 (22:42 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 27 Aug 2006 22:42:52 +0000 (22:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8

76 files changed:
include/llvm/PassSupport.h
lib/Analysis/AliasAnalysisCounter.cpp
lib/Analysis/AliasAnalysisEvaluator.cpp
lib/Analysis/AliasSetTracker.cpp
lib/Analysis/BasicAliasAnalysis.cpp
lib/Analysis/DataStructure/DataStructureAA.cpp
lib/Analysis/DataStructure/DataStructureOpt.cpp
lib/Analysis/DataStructure/Steensgaard.cpp
lib/Analysis/IPA/Andersens.cpp
lib/Analysis/IPA/CallGraph.cpp
lib/Analysis/IPA/GlobalsModRef.cpp
lib/Analysis/LoadValueNumbering.cpp
lib/Analysis/ProfileInfo.cpp
lib/Analysis/ProfileInfoLoaderPass.cpp
lib/Analysis/ValueNumbering.cpp
lib/CodeGen/UnreachableBlockElim.cpp
lib/Transforms/Hello/Hello.cpp
lib/Transforms/IPO/ArgumentPromotion.cpp
lib/Transforms/IPO/ConstantMerge.cpp
lib/Transforms/IPO/DeadArgumentElimination.cpp
lib/Transforms/IPO/DeadTypeElimination.cpp
lib/Transforms/IPO/FunctionResolution.cpp
lib/Transforms/IPO/GlobalDCE.cpp
lib/Transforms/IPO/GlobalOpt.cpp
lib/Transforms/IPO/IPConstantPropagation.cpp
lib/Transforms/IPO/IndMemRemoval.cpp
lib/Transforms/IPO/InlineSimple.cpp
lib/Transforms/IPO/Internalize.cpp
lib/Transforms/IPO/LoopExtractor.cpp
lib/Transforms/IPO/LowerSetJmp.cpp
lib/Transforms/IPO/PruneEH.cpp
lib/Transforms/IPO/RaiseAllocations.cpp
lib/Transforms/IPO/SimplifyLibCalls.cpp
lib/Transforms/IPO/StripSymbols.cpp
lib/Transforms/Instrumentation/BlockProfiling.cpp
lib/Transforms/Instrumentation/EdgeProfiling.cpp
lib/Transforms/Instrumentation/EmitFunctions.cpp
lib/Transforms/Instrumentation/RSProfiling.cpp
lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
lib/Transforms/Instrumentation/TraceValues.cpp
lib/Transforms/LevelRaise.cpp
lib/Transforms/Scalar/ADCE.cpp
lib/Transforms/Scalar/BasicBlockPlacement.cpp
lib/Transforms/Scalar/CondPropagate.cpp
lib/Transforms/Scalar/ConstantProp.cpp
lib/Transforms/Scalar/CorrelatedExprs.cpp
lib/Transforms/Scalar/DCE.cpp
lib/Transforms/Scalar/DeadStoreElimination.cpp
lib/Transforms/Scalar/GCSE.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Scalar/InstructionCombining.cpp
lib/Transforms/Scalar/LICM.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp
lib/Transforms/Scalar/LoopUnroll.cpp
lib/Transforms/Scalar/LoopUnswitch.cpp
lib/Transforms/Scalar/LowerGC.cpp
lib/Transforms/Scalar/LowerPacked.cpp
lib/Transforms/Scalar/Reassociate.cpp
lib/Transforms/Scalar/Reg2Mem.cpp
lib/Transforms/Scalar/SCCP.cpp
lib/Transforms/Scalar/ScalarReplAggregates.cpp
lib/Transforms/Scalar/SimplifyCFG.cpp
lib/Transforms/Scalar/TailDuplication.cpp
lib/Transforms/Scalar/TailRecursionElimination.cpp
lib/Transforms/Utils/BreakCriticalEdges.cpp
lib/Transforms/Utils/LCSSA.cpp
lib/Transforms/Utils/LoopSimplify.cpp
lib/Transforms/Utils/LowerAllocations.cpp
lib/Transforms/Utils/LowerInvoke.cpp
lib/Transforms/Utils/LowerSelect.cpp
lib/Transforms/Utils/LowerSwitch.cpp
lib/Transforms/Utils/Mem2Reg.cpp
lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
lib/VMCore/AsmWriter.cpp
lib/VMCore/Verifier.cpp
tools/bugpoint/ExtractFunction.cpp

index 95702c0cfa5ce2587a79807169df7be1748c5a91..5f8a1458c2b31cf02c5fee925af7c5a47926f08b 100644 (file)
@@ -208,53 +208,6 @@ struct RegisterPass : public RegisterPassBase {
   }
 };
 
-/// RegisterOpt - Register something that is to show up in Opt, this is just a
-/// shortcut for specifying RegisterPass...
-///
-template<typename PassName>
-struct RegisterOpt : public RegisterPassBase {
-  RegisterOpt(const char *PassArg, const char *Name, bool CFGOnly = false)
-  : RegisterPassBase(Name, PassArg, typeid(PassName),
-                     callDefaultCtor<PassName>) {
-    if (CFGOnly) setOnlyUsesCFG();
-  }
-
-  /// Register Pass using default constructor explicitly...
-  ///
-  RegisterOpt(const char *PassArg, const char *Name, Pass *(*ctor)(),
-              bool CFGOnly = false) 
-  : RegisterPassBase(Name, PassArg, typeid(PassName), ctor) {
-    if (CFGOnly) setOnlyUsesCFG();
-  }
-
-  /// Register FunctionPass using default constructor explicitly...
-  ///
-  RegisterOpt(const char *PassArg, const char *Name, FunctionPass *(*ctor)(),
-              bool CFGOnly = false)
-  : RegisterPassBase(Name, PassArg, typeid(PassName),
-                     static_cast<Pass*(*)()>(ctor)) {
-    if (CFGOnly) setOnlyUsesCFG();
-  }
-
-  /// Register Pass using TargetMachine constructor...
-  ///
-  RegisterOpt(const char *PassArg, const char *Name,
-               Pass *(*targetctor)(TargetMachine &), bool CFGOnly = false)
-  : RegisterPassBase(Name, PassArg, typeid(PassName), 0, targetctor) {
-    if (CFGOnly) setOnlyUsesCFG();
-  }
-
-  /// Register FunctionPass using TargetMachine constructor...
-  ///
-  RegisterOpt(const char *PassArg, const char *Name,
-              FunctionPass *(*targetctor)(TargetMachine &),
-              bool CFGOnly = false)
-  : RegisterPassBase(Name, PassArg, typeid(PassName), 0,
-                     static_cast<Pass*(*)(TargetMachine&)>(targetctor)) {
-    if (CFGOnly) setOnlyUsesCFG();
-  }
-};
-
 
 /// RegisterAnalysisGroup - Register a Pass as a member of an analysis _group_.
 /// Analysis groups are used to define an interface (which need not derive from
index 8c8cb3e1d48dc942e3cc624d66fdf34159cf4573..562b4f50b88987fafc3888cdab508c653663ffa9 100644 (file)
@@ -109,7 +109,7 @@ namespace {
     }
   };
 
-  RegisterOpt<AliasAnalysisCounter>
+  RegisterPass<AliasAnalysisCounter>
   X("count-aa", "Count Alias Analysis Query Responses");
   RegisterAnalysisGroup<AliasAnalysis, AliasAnalysisCounter> Y;
 }
index f42fde899737bdf4b076cc7d8e77b2b376de824b..9f5a46df10f1aaa4155ea4e545240d8433455eea 100644 (file)
@@ -70,7 +70,7 @@ namespace {
     bool doFinalization(Module &M);
   };
 
-  RegisterOpt<AAEval>
+  RegisterPass<AAEval>
   X("aa-eval", "Exhaustive Alias Analysis Precision Evaluator");
 }
 
index 16c652117f563040b23d29229cde46cb213b38d3..6d09b65c6b8dfb514ad463161f6a24fbead3ac3b 100644 (file)
@@ -568,5 +568,5 @@ namespace {
       return false;
     }
   };
-  RegisterOpt<AliasSetPrinter> X("print-alias-sets", "Alias Set Printer");
+  RegisterPass<AliasSetPrinter> X("print-alias-sets", "Alias Set Printer");
 }
index e2b8ed198d3f39d7aa80f40c1eca90c96e83af41..2c5fc81b150d4c4b2a7453baa10688b5cd0837a8 100644 (file)
@@ -72,7 +72,7 @@ namespace {
   };
 
   // Register this pass...
-  RegisterOpt<NoAA>
+  RegisterPass<NoAA>
   U("no-aa", "No Alias Analysis (always returns 'may' alias)");
 
   // Declare that we implement the AliasAnalysis interface
@@ -117,7 +117,7 @@ namespace {
   };
 
   // Register this pass...
-  RegisterOpt<BasicAliasAnalysis>
+  RegisterPass<BasicAliasAnalysis>
   X("basicaa", "Basic Alias Analysis (default AA impl)");
 
   // Declare that we implement the AliasAnalysis interface
index 1ea1d889477e2ffdddb2c93be3d9453ea75bcf64..bbb2ba21f344192a9a04d1104105f1b7c3786706 100644 (file)
@@ -96,7 +96,7 @@ namespace {
   };
 
   // Register the pass...
-  RegisterOpt<DSAA> X("ds-aa", "Data Structure Graph Based Alias Analysis");
+  RegisterPass<DSAA> X("ds-aa", "Data Structure Graph Based Alias Analysis");
 
   // Register as an implementation of AliasAnalysis
   RegisterAnalysisGroup<AliasAnalysis, DSAA> Y;
index c464aee1a1303681c1eee3c1beb29a55c3ce9879..56748832ab53ebcd4a4fadaccbc75535882c127c 100644 (file)
@@ -47,7 +47,7 @@ namespace {
     bool OptimizeGlobals(Module &M);
   };
 
-  RegisterOpt<DSOpt> X("ds-opt", "DSA-based simple optimizations");
+  RegisterPass<DSOpt> X("ds-opt", "DSA-based simple optimizations");
 }
 
 ModulePass *llvm::createDSOptPass() { return new DSOpt(); }
index 8a8391ff2a2aae5efd9f6aa1d50392f911d363ba..8a98022869db110e5ee6ef7831956f53c63c90a3 100644 (file)
@@ -73,8 +73,8 @@ namespace {
   };
 
   // Register the pass...
-  RegisterOpt<Steens> X("steens-aa",
-                        "Steensgaard's alias analysis (DSGraph based)");
+  RegisterPass<Steens> X("steens-aa",
+                         "Steensgaard's alias analysis (DSGraph based)");
 
   // Register as an implementation of AliasAnalysis
   RegisterAnalysisGroup<AliasAnalysis, Steens> Y;
index 1fc70e62a35758dd59dbd4aad192694c4e2103bb..bc80f5b9568ad6121d68977fa9d3e40e3daf00b7 100644 (file)
@@ -336,8 +336,8 @@ namespace {
     void visitInstruction(Instruction &I);
   };
 
-  RegisterOpt<Andersens> X("anders-aa",
-                           "Andersen's Interprocedural Alias Analysis");
+  RegisterPass<Andersens> X("anders-aa",
+                            "Andersen's Interprocedural Alias Analysis");
   RegisterAnalysisGroup<AliasAnalysis, Andersens> Y;
 }
 
index 23a7599ce57138da2d9199fe3d32a7ff5a9770d4..8836807bfc61251d14c87df97430a4bc8a81fe77 100644 (file)
@@ -182,7 +182,7 @@ private:
 };
 
 RegisterAnalysisGroup<CallGraph> X("Call Graph");
-RegisterOpt<BasicCallGraph> Y("basiccg", "Basic CallGraph Construction");
+RegisterPass<BasicCallGraph> Y("basiccg", "Basic CallGraph Construction");
 RegisterAnalysisGroup<CallGraph, BasicCallGraph, true> Z;
 
 } //End anonymous namespace
index 4765b096b38777bf5e07d1e6817168b61f877cda..6739dfbf0ee4bec60ebd637792a37beba76a76a6 100644 (file)
@@ -135,8 +135,8 @@ namespace {
                              std::vector<Function*> &Writers);
   };
 
-  RegisterOpt<GlobalsModRef> X("globalsmodref-aa",
-                               "Simple mod/ref analysis for globals");
+  RegisterPass<GlobalsModRef> X("globalsmodref-aa",
+                                "Simple mod/ref analysis for globals");
   RegisterAnalysisGroup<AliasAnalysis, GlobalsModRef> Y;
 }
 
index 7169b3c1682389e18ffe62fed7eedf63d62e6e4b..bac80c8d986f5e23e7d763b659113c90ad3659da 100644 (file)
@@ -81,7 +81,7 @@ namespace {
   };
 
   // Register this pass...
-  RegisterOpt<LoadVN> X("load-vn", "Load Value Numbering");
+  RegisterPass<LoadVN> X("load-vn", "Load Value Numbering");
 
   // Declare that we implement the ValueNumbering interface
   RegisterAnalysisGroup<ValueNumbering, LoadVN> Y;
index fa3af80044fa66f1cc4eebb13a00350267dbe018..b8ab88b8f2e0a0a3a40275a50e34e22100660fd4 100644 (file)
@@ -85,7 +85,7 @@ namespace {
   struct NoProfileInfo : public ImmutablePass, public ProfileInfo {};
 
   // Register this pass...
-  RegisterOpt<NoProfileInfo>
+  RegisterPass<NoProfileInfo>
   X("no-profile", "No Profile Information");
 
   // Declare that we implement the ProfileInfo interface
index 354c871ff208891dbc84a710bb7abd034b2c6fb5..57e3627c53c024ade504bbb57b8247d88943a71f 100644 (file)
@@ -49,7 +49,7 @@ namespace {
     virtual bool runOnModule(Module &M);
   };
 
-  RegisterOpt<LoaderPass>
+  RegisterPass<LoaderPass>
   X("profile-loader", "Load profile information from llvmprof.out");
 
   RegisterAnalysisGroup<ProfileInfo, LoaderPass> Y;
index c534bba4dcb14548e0ea4ec5dc3cf3a2ff82c8ba..fb3bed05531ac37b2155f1037229c6e6d9f9c2a6 100644 (file)
@@ -60,7 +60,7 @@ namespace {
   };
 
   // Register this pass...
-  RegisterOpt<BasicVN>
+  RegisterPass<BasicVN>
   X("basicvn", "Basic Value Numbering (default GVN impl)");
 
   // Declare that we implement the ValueNumbering interface
index fe334849ac42e58011caf11fcd26aac5d6e60355..951deb60d96bf5c6be9f51199e3ce5ed622d698b 100644 (file)
@@ -35,7 +35,7 @@ namespace {
   class VISIBILITY_HIDDEN UnreachableBlockElim : public FunctionPass {
     virtual bool runOnFunction(Function &F);
   };
-  RegisterOpt<UnreachableBlockElim>
+  RegisterPass<UnreachableBlockElim>
   X("unreachableblockelim", "Remove unreachable blocks from the CFG");
 }
 
index 804c3a70b2dd6921bbf276885dc31a52715f427e..cfa879a32db8862afa82353d3e5d751a266cfa59 100644 (file)
@@ -34,7 +34,7 @@ namespace {
       return false;
     }
   };
-  RegisterOpt<Hello> X("hello", "Hello World Pass");
+  RegisterPass<Hello> X("hello", "Hello World Pass");
 
   // Hello2 - The second implementation with getAnalysisUsage implemented.
   struct Hello2 : public FunctionPass {
@@ -52,5 +52,6 @@ namespace {
       AU.setPreservesAll();
     };
   };
-  RegisterOpt<Hello2> Y("hello2", "Hello World Pass (with getAnalysisUsage implemented)");
+  RegisterPass<Hello2> Y("hello2",
+                        "Hello World Pass (with getAnalysisUsage implemented)");
 }
index 960e36ba54c5c096ce420fdb2625ee97a8bbeedb..5183d43bc7c2480567bee8e986f1ec3f7938159a 100644 (file)
@@ -72,8 +72,8 @@ namespace {
     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() {
index 220d0d8722c7bf2636e98bf32c0ff519b594db9e..aca42fe23be3b1a56ce169a9a771dde4b9a5eaa5 100644 (file)
@@ -33,7 +33,7 @@ namespace {
     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(); }
index e1feed922e3b0fc3aa31cd547a37c99a5e62b421..08d92a5c63d9cf8880e53a1ce647dd7308407db6 100644 (file)
@@ -93,7 +93,7 @@ namespace {
 
     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
index 005d6bd600a7f3123333f0cbcb9f56c0dbfe60b7..57e5fa310970a64dbadf2851d223b7b4105649bb 100644 (file)
@@ -36,7 +36,7 @@ namespace {
       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");
 }
index d8b1a862eabbe5d761a9fe1a39813e7c2b4d17d1..a514b92b5ff5d5a8c2a754d5f54b76c7f37b4f9a 100644 (file)
@@ -43,7 +43,7 @@ namespace {
 
     bool runOnModule(Module &M);
   };
-  RegisterOpt<FunctionResolvingPass> X("funcresolve", "Resolve Functions");
+  RegisterPass<FunctionResolvingPass> X("funcresolve", "Resolve Functions");
 }
 
 ModulePass *llvm::createFunctionResolvingPass() {
@@ -314,7 +314,8 @@ bool FunctionResolvingPass::runOnModule(Module &M) {
       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 @@ bool FunctionResolvingPass::runOnModule(Module &M) {
       ++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;
index 072cef2eb5a9895a9f5debbc20d2c4c53f892a8a..07296cfa5e456ec56694ac3bba35839994730278 100644 (file)
@@ -44,7 +44,7 @@ namespace {
     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(); }
index 052177973198212ac40b52e92960fd47734b2e09..8324b432e893b8e917fc7bd242f40635e2a08093 100644 (file)
@@ -60,10 +60,10 @@ namespace {
     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 @@ static bool ValueIsOnlyUsedLocallyOrStoredToOneGlobal(Instruction *V,
 // 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)){
index 02395b554840ebe8169bfab94909908ff2471389..4713fb6aea3950db236e262931d574ae3164db31 100644 (file)
@@ -28,7 +28,7 @@ namespace {
   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 @@ namespace {
     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 @@ bool IPCP::runOnModule(Module &M) {
 /// 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());
index b5d0195a298c5c4cc838f05d0fd0eed55fb903b3..78b6ea53e3039840d59ceef5112f3768020597ab 100644 (file)
@@ -38,7 +38,7 @@ namespace {
     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
 
 
index 4a41bb6af5dc1dff866ddab99845cf81b479f35e..643668483573c6cb258af173325e897bcde7bc97 100644 (file)
@@ -55,7 +55,7 @@ namespace {
   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(); }
index f1e1e9cc58c08f6468444dd55f303cca18d78b11..2eec95ff618cde9993299fbe64fbd421b2d50fb8 100644 (file)
@@ -49,7 +49,7 @@ namespace {
     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) 
index 39d0fca94f5d6647543efb7742228d35113403c6..a4ce585ef9a7a8f8a4c32be568400a0090d05bb5 100644 (file)
@@ -46,7 +46,7 @@ namespace {
     }
   };
 
-  RegisterOpt<LoopExtractor>
+  RegisterPass<LoopExtractor>
   X("loop-extract", "Extract loops into new functions");
 
   /// SingleLoopExtractor - For bugpoint.
@@ -54,7 +54,7 @@ namespace {
     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 @@ namespace {
 
     bool runOnModule(Module &M);
   };
-  RegisterOpt<BlockExtractorPass>
+  RegisterPass<BlockExtractorPass>
   XX("extract-blocks", "Extract Basic Blocks From Module (for bugpoint use)");
 }
 
index 9dd9501f1cc54ea9465762653fa20e28cbd617f6..8018553e4f38fb7e845c5548c9ba4e0d787935f3 100644 (file)
@@ -120,7 +120,7 @@ namespace {
     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
index d536965518c68b58fe2e79823f868f4af90a51d0..8ba0ac04023af894dd185d2394c2844bc5d0976a 100644 (file)
@@ -46,7 +46,7 @@ namespace {
     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(); }
index 2b487d009d7c2d1dd82e36ad66f0faa18dbfb3ba..188b7f527f4c18afe67dd76acae051c92fbd53ba 100644 (file)
@@ -44,7 +44,7 @@ namespace {
     bool runOnModule(Module &M);
   };
 
-  RegisterOpt<RaiseAllocations>
+  RegisterPass<RaiseAllocations>
   X("raiseallocs", "Raise allocations from calls to instructions");
 }  // end anonymous namespace
 
index d8415d74b84d03d81e5581176860db043d7556a4..79cdf28e0a4bfeeb02b241cade09828b81eb540c 100644 (file)
@@ -366,8 +366,8 @@ private:
 };
 
 // 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
 
index da5e8a4844ae007321f783e56e9aa114738e2562..75b24a728261e2e70771eef1544c8dd3aa343cc4 100644 (file)
@@ -43,7 +43,7 @@ namespace {
       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 @@ bool StripSymbols::runOnModule(Module &M) {
   // 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
 
index 9a85fc50d1c25c92b6cff297033476ea65ee6577..859f596fa6230430cfde727280ec888a5a9bc7e9 100644 (file)
@@ -35,7 +35,7 @@ namespace {
     bool runOnModule(Module &M);
   };
 
-  RegisterOpt<FunctionProfiler> X("insert-function-profiling",
+  RegisterPass<FunctionProfiler> X("insert-function-profiling",
                                "Insert instrumentation for function profiling");
   RegisterAnalysisGroup<RSProfilers, FunctionProfiler> XG;
 
@@ -81,8 +81,8 @@ namespace {
     bool runOnModule(Module &M);
   };
 
-  RegisterOpt<BlockProfiler> Y("insert-block-profiling",
-                               "Insert instrumentation for block profiling");
+  RegisterPass<BlockProfiler> Y("insert-block-profiling",
+                                "Insert instrumentation for block profiling");
   RegisterAnalysisGroup<RSProfilers, BlockProfiler> YG;
 }
 
index 2ac6cc87ded7767985cd812940127118d9d2789c..a94c42dcaaf7a23f20f1f8ae9ffc57609d5a9a93 100644 (file)
@@ -33,8 +33,8 @@ namespace {
     bool runOnModule(Module &M);
   };
 
-  RegisterOpt<EdgeProfiler> X("insert-edge-profiling",
-                              "Insert instrumentation for edge profiling");
+  RegisterPass<EdgeProfiler> X("insert-edge-profiling",
+                               "Insert instrumentation for edge profiling");
 }
 
 ModulePass *llvm::createEdgeProfilerPass() { return new EdgeProfiler(); }
index a49129399d2b0073d83057415fe66b3d59a9f4d9..05c3419e29bea07a9f12d058eea09b554283233e 100644 (file)
@@ -40,7 +40,7 @@ namespace {
     bool runOnModule(Module &M);
   };
 
-  RegisterOpt<EmitFunctionTable>
+  RegisterPass<EmitFunctionTable>
   X("emitfuncs", "Emit a function table for the reoptimizer");
 }
 
index 31c01ee886dd6546f23698ba69e3ae59388a5217..984190a611b9575659b8c7f0602687ac27d71daf 100644 (file)
@@ -87,7 +87,7 @@ namespace {
   };
 
   static RegisterAnalysisGroup<RSProfilers> A("Profiling passes");
-  static RegisterOpt<NullProfilerRS> NP("insert-null-profiling-rs",
+  static RegisterPass<NullProfilerRS> NP("insert-null-profiling-rs",
                                        "Measure profiling framework overhead");
   static RegisterAnalysisGroup<RSProfilers, NullProfilerRS, true> NPT;
 
@@ -160,8 +160,8 @@ namespace {
     virtual void getAnalysisUsage(AnalysisUsage &AU) const;
   };
 
-  RegisterOpt<ProfilerRS> X("insert-rs-profiling-framework",
-                          "Insert random sampling instrumentation  framework");
+  RegisterPass<ProfilerRS> X("insert-rs-profiling-framework",
+                          "Insert random sampling instrumentation framework");
 }
 
 //Local utilities
index 66a1b22915b57a7ab0db2cdbae03cc5019335f07..d3af056ffce08697802febbb25f4077ca6d4e9ab 100644 (file)
@@ -31,7 +31,7 @@ namespace {
     bool runOnModule(Module &M);
   };
 
-  RegisterOpt<TraceBasicBlocks> X("trace-basic-blocks",
+  RegisterPass<TraceBasicBlocks> X("trace-basic-blocks",
                               "Insert instrumentation for basic block tracing");
 }
 
index eba596b4274d5dc7363798badd7c8354e3a137e1..d335f16cad84205cb6616c94fc07b0e119c4e697 100644 (file)
@@ -104,8 +104,8 @@ namespace {
   };
 
   // Register the passes...
-  RegisterOpt<FunctionTracer>  X("tracem","Insert Function trace code only");
-  RegisterOpt<BasicBlockTracer> Y("trace","Insert BB and Function trace code");
+  RegisterPass<FunctionTracer>  X("tracem","Insert Function trace code only");
+  RegisterPass<BasicBlockTracer> Y("trace","Insert BB and Function trace code");
 } // end anonymous namespace
 
 /// Just trace functions
index 9cbe3b813eba1620bd070563ea545a309dcbe76a..4c366bdd33ef59e16d0dcfa24f5413ad813a375c 100644 (file)
@@ -80,7 +80,7 @@ namespace {
     bool PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI);
   };
 
-  RegisterOpt<RPR> X("raise", "Raise Pointer References");
+  RegisterPass<RPR> X("raise", "Raise Pointer References");
 }
 
 
index bda86209698448a249beda976f3057ee4af82e5f..8632c7ad5872f7496255b5793d8e1dac36b32d33 100644 (file)
@@ -102,7 +102,7 @@ private:
   }
 };
 
-  RegisterOpt<ADCE> X("adce", "Aggressive Dead Code Elimination");
+  RegisterPass<ADCE> X("adce", "Aggressive Dead Code Elimination");
 } // End of anonymous namespace
 
 FunctionPass *llvm::createAggressiveDCEPass() { return new ADCE(); }
index c926c561d8216891f54a3c9e76e7ae469ca95e51..492fba2bb438b5d20934b99bf8b9dbcf94260e4e 100644 (file)
@@ -68,8 +68,8 @@ namespace {
     void PlaceBlocks(BasicBlock *BB);
   };
 
-  RegisterOpt<BlockPlacement> X("block-placement",
-                                "Profile Guided Basic Block Placement");
+  RegisterPass<BlockPlacement> X("block-placement",
+                                 "Profile Guided Basic Block Placement");
 }
 
 FunctionPass *llvm::createBlockPlacementPass() { return new BlockPlacement(); }
index 49c87fd02f069eb8b6ad64b90f629febbdf29299..5eb5abd9f87898ebfa1131e9559d9a2c2776b60e 100644 (file)
@@ -46,7 +46,7 @@ namespace {
     void SimplifyPredecessors(SwitchInst *SI);
     void RevectorBlockTo(BasicBlock *FromBB, BasicBlock *ToBB);
   };
-  RegisterOpt<CondProp> X("condprop", "Conditional Propagation");
+  RegisterPass<CondProp> X("condprop", "Conditional Propagation");
 }
 
 FunctionPass *llvm::createCondPropagationPass() {
index 8955aee281229d29339f1b643394a3b475135027..8f3baf913c03da29faff0961d5f2bea2a8592988 100644 (file)
@@ -39,7 +39,8 @@ namespace {
     }
   };
 
-  RegisterOpt<ConstantPropagation> X("constprop","Simple constant propagation");
+  RegisterPass<ConstantPropagation> X("constprop",
+                                      "Simple constant propagation");
 }
 
 FunctionPass *llvm::createConstantPropagationPass() {
index feae636dfec3163367514b2494f676538f01bfa1..722a22463985ddbaf96f234cd9f4929367fc3166 100644 (file)
@@ -286,7 +286,7 @@ namespace {
     bool SimplifyBasicBlock(BasicBlock &BB, const RegionInfo &RI);
     bool SimplifyInstruction(Instruction *Inst, const RegionInfo &RI);
   };
-  RegisterOpt<CEE> X("cee", "Correlated Expression Elimination");
+  RegisterPass<CEE> X("cee", "Correlated Expression Elimination");
 }
 
 FunctionPass *llvm::createCorrelatedExpressionEliminationPass() {
index 2783f12f05d32f886d6154423d5196232ee59433..a4a1104e92428ca5d877e4f9dd8d596a9a1e3932 100644 (file)
@@ -50,7 +50,7 @@ namespace {
     }
   };
 
-  RegisterOpt<DeadInstElimination> X("die", "Dead Instruction Elimination");
+  RegisterPass<DeadInstElimination> X("die", "Dead Instruction Elimination");
 }
 
 FunctionPass *llvm::createDeadInstEliminationPass() {
@@ -71,7 +71,7 @@ namespace {
     }
  };
 
-  RegisterOpt<DCE> Y("dce", "Dead Code Elimination");
+  RegisterPass<DCE> Y("dce", "Dead Code Elimination");
 }
 
 bool DCE::runOnFunction(Function &F) {
index d3f461d3182440ad2fac58ced4539428eaed9e56..6684b21f99a0df1f7c4d8c9693deee3bf7d5e3cc 100644 (file)
@@ -54,7 +54,7 @@ namespace {
       AU.addPreserved<AliasAnalysis>();
     }
   };
-  RegisterOpt<DSE> X("dse", "Dead Store Elimination");
+  RegisterPass<DSE> X("dse", "Dead Store Elimination");
 }
 
 FunctionPass *llvm::createDeadStoreEliminationPass() { return new DSE(); }
index 3d6e62481185662aa0b003681f190e01892d52d3..7dbdf0ab96a6016e0d5f26670f1617d93bd2589e 100644 (file)
@@ -51,7 +51,7 @@ namespace {
     }
   };
 
-  RegisterOpt<GCSE> X("gcse", "Global Common Subexpression Elimination");
+  RegisterPass<GCSE> X("gcse", "Global Common Subexpression Elimination");
 }
 
 // createGCSEPass - The public interface to this file...
index 4287bd085aa5a4b07a99e98bb5b099ebd810e268..dbaacaa7ac9b97551beae686a71a7ca7d3d765e9 100644 (file)
@@ -92,7 +92,7 @@ namespace {
 
     void DeleteTriviallyDeadInstructions(std::set<Instruction*> &Insts);
   };
-  RegisterOpt<IndVarSimplify> X("indvars", "Canonicalize Induction Variables");
+  RegisterPass<IndVarSimplify> X("indvars", "Canonicalize Induction Variables");
 }
 
 FunctionPass *llvm::createIndVarSimplifyPass() {
index f07d6a1edda586455ca25e7bdf1ebcff4499293c..59e5acf9dba7f337e0e76619625af482e2128506 100644 (file)
@@ -264,7 +264,7 @@ namespace {
     Value *EvaluateInDifferentType(Value *V, const Type *Ty);
   };
 
-  RegisterOpt<InstCombiner> X("instcombine", "Combine redundant instructions");
+  RegisterPass<InstCombiner> X("instcombine", "Combine redundant instructions");
 }
 
 // getComplexity:  Assign a complexity or rank value to LLVM Values...
index 2ecf6aa046d1cf134b5a5cc1c3c7e42f237569ba..a24b366e8d9361a72bc5055c3b35a1e257dfabb6 100644 (file)
@@ -197,7 +197,7 @@ namespace {
                                     std::map<Value*, AllocaInst*> &Val2AlMap);
   };
 
-  RegisterOpt<LICM> X("licm", "Loop Invariant Code Motion");
+  RegisterPass<LICM> X("licm", "Loop Invariant Code Motion");
 }
 
 FunctionPass *llvm::createLICMPass() { return new LICM(); }
index cfdba4e356a753914406c76bef7986d857b181d6..7f0248845d535445509cf6a57982989b9952578d 100644 (file)
@@ -194,8 +194,7 @@ private:
                                       Loop *L, bool isOnlyStride);
     void DeleteTriviallyDeadInstructions(std::set<Instruction*> &Insts);
   };
-  RegisterOpt<LoopStrengthReduce> X("loop-reduce",
-                                    "Loop Strength Reduction");
+  RegisterPass<LoopStrengthReduce> X("loop-reduce", "Loop Strength Reduction");
 }
 
 FunctionPass *llvm::createLoopStrengthReducePass(const TargetLowering *TLI) {
index 676afb0e226f8a5d274a1320813356b60f47f8d3..c1a510dcb5e537cc285565d462dcfb72cdf75b5a 100644 (file)
@@ -60,7 +60,7 @@ namespace {
       AU.addPreserved<LoopInfo>();
     }
   };
-  RegisterOpt<LoopUnroll> X("loop-unroll", "Unroll loops");
+  RegisterPass<LoopUnroll> X("loop-unroll", "Unroll loops");
 }
 
 FunctionPass *llvm::createLoopUnrollPass() { return new LoopUnroll(); }
index 8f049b8668e00be6e0e5a4c6f87e7711ba6a979f..9c3655205b576aaabf8481a7d6df977cb1b2e57b 100644 (file)
@@ -103,7 +103,7 @@ namespace {
                            std::vector<Instruction*> &Worklist);
     void RemoveLoopFromHierarchy(Loop *L);
   };
-  RegisterOpt<LoopUnswitch> X("loop-unswitch", "Unswitch loops");
+  RegisterPass<LoopUnswitch> X("loop-unswitch", "Unswitch loops");
 }
 
 FunctionPass *llvm::createLoopUnswitchPass() { return new LoopUnswitch(); }
index aa599ecc2bfa2d85d3eaa444d63121ac8ac0876f..851009c7d6f4ebcf44bad085b9dd154720cae492 100644 (file)
@@ -56,7 +56,7 @@ namespace {
     const StructType *getRootRecordType(unsigned NumRoots);
   };
 
-  RegisterOpt<LowerGC>
+  RegisterPass<LowerGC>
   X("lowergc", "Lower GC intrinsics, for GCless code generators");
 }
 
index b24460c98877c57ec824de6b44bd4094837f74c4..79a55ee876edaa0e9a585f04a9ffd38b0d0cb9d9 100644 (file)
@@ -102,7 +102,7 @@ private:
    std::vector<Instruction*> instrsToRemove;
 };
 
-RegisterOpt<LowerPacked>
+RegisterPass<LowerPacked>
 X("lower-packed",
   "lowers packed operations to operations on smaller packed datatypes");
 
index 353cd1435a6586ec69d8f76bfbcda21d7b7269ce..250d62b1266fba8b19ea9974d95b351d427126fc 100644 (file)
@@ -90,7 +90,7 @@ namespace {
     void RemoveDeadBinaryOp(Value *V);
   };
 
-  RegisterOpt<Reassociate> X("reassociate", "Reassociate expressions");
+  RegisterPass<Reassociate> X("reassociate", "Reassociate expressions");
 }
 
 // Public interface to the Reassociate pass
index 0b16ab9ac88e7e4bbe38d07723b15f1a7a672247..10d05ee7013b201095aff417b52b90c3fb7d6e0a 100644 (file)
@@ -76,7 +76,7 @@ namespace {
     }
   };
   
-  RegisterOpt<RegToMem> X("reg2mem", "Demote all values to stack slots");
+  RegisterPass<RegToMem> X("reg2mem", "Demote all values to stack slots");
 }
 
 // createDemoteRegisterToMemory - Provide an entry point to create this pass.
index 9328a251d8a817983fa609b42d8e9b44cbfec75a..31d084053c664e96719c519f8c5cf80ecf879d6a 100644 (file)
@@ -1075,7 +1075,7 @@ namespace {
     }
   };
 
-  RegisterOpt<SCCP> X("sccp", "Sparse Conditional Constant Propagation");
+  RegisterPass<SCCP> X("sccp", "Sparse Conditional Constant Propagation");
 } // end anonymous namespace
 
 
@@ -1183,7 +1183,7 @@ namespace {
     bool runOnModule(Module &M);
   };
 
-  RegisterOpt<IPSCCP>
+  RegisterPass<IPSCCP>
   Y("ipsccp", "Interprocedural Sparse Conditional Constant Propagation");
 } // end anonymous namespace
 
index 9ddc634f5607b76f72b41ad26e8297996466622f..9fffd40039e9dc718befc4bb1baecc7e0c3690df 100644 (file)
@@ -70,7 +70,7 @@ namespace {
     void ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, unsigned Offset);
   };
 
-  RegisterOpt<SROA> X("scalarrepl", "Scalar Replacement of Aggregates");
+  RegisterPass<SROA> X("scalarrepl", "Scalar Replacement of Aggregates");
 }
 
 // Public interface to the ScalarReplAggregates pass
index 8b9c518de9f9427ddfbfb37cb3713ed784371d39..6b42f1c35ad8a8f3f0d945d8471457ca4b341def 100644 (file)
@@ -35,7 +35,7 @@ namespace {
   struct CFGSimplifyPass : public FunctionPass {
     virtual bool runOnFunction(Function &F);
   };
-  RegisterOpt<CFGSimplifyPass> X("simplifycfg", "Simplify the CFG");
+  RegisterPass<CFGSimplifyPass> X("simplifycfg", "Simplify the CFG");
 }
 
 // Public interface to the CFGSimplification pass
index 0bd592653942aacdbdefa03a6b8be8a659131683..acf0db0ebe4ac9af74ed1941aebabcf846bc4bf7 100644 (file)
@@ -47,7 +47,7 @@ namespace {
     inline bool shouldEliminateUnconditionalBranch(TerminatorInst *TI);
     inline void eliminateUnconditionalBranch(BranchInst *BI);
   };
-  RegisterOpt<TailDup> X("tailduplicate", "Tail Duplication");
+  RegisterPass<TailDup> X("tailduplicate", "Tail Duplication");
 }
 
 // Public interface to the Tail Duplication pass
index 99c1f10865b0cf876a4cfb2d23df6186843b2c9b..5b46007e42b272c83ca17ed3d7e7426f0914fda6 100644 (file)
@@ -75,7 +75,7 @@ namespace {
     bool CanMoveAboveCall(Instruction *I, CallInst *CI);
     Value *CanTransformAccumulatorRecursion(Instruction *I, CallInst *CI);
   };
-  RegisterOpt<TailCallElim> X("tailcallelim", "Tail Call Elimination");
+  RegisterPass<TailCallElim> X("tailcallelim", "Tail Call Elimination");
 }
 
 // Public interface to the TailCallElimination pass
index cc822dae86adbfa8764621a1db4bd1e43b38619d..01811cf2fe001890dfd5bd8d91c7fb3ed279c294 100644 (file)
@@ -47,7 +47,7 @@ namespace {
     }
   };
 
-  RegisterOpt<BreakCriticalEdges> X("break-crit-edges",
+  RegisterPass<BreakCriticalEdges> X("break-crit-edges",
                                     "Break critical edges in CFG");
 }
 
index 21f9352637341d320286216615b1148d3acba457..6f93ac6fceff261d9829509b539c8f51abea41d5 100644 (file)
@@ -80,7 +80,7 @@ namespace {
     }
   };
   
-  RegisterOpt<LCSSA> X("lcssa", "Loop-Closed SSA Form Pass");
+  RegisterPass<LCSSA> X("lcssa", "Loop-Closed SSA Form Pass");
 }
 
 FunctionPass *llvm::createLCSSAPass() { return new LCSSA(); }
index 88e75b76ecab8706b3d784f4d81d1d592d2ae86f..7041282100ed113b0cf391e94a15afd4d3c388c3 100644 (file)
@@ -89,7 +89,7 @@ namespace {
                                          std::vector<BasicBlock*> &PredBlocks);
   };
 
-  RegisterOpt<LoopSimplify>
+  RegisterPass<LoopSimplify>
   X("loopsimplify", "Canonicalize natural loops", true);
 }
 
index 8eec021b082a4739768385d04df3ca4f7cdd5eb7..451df70fef71d418062ee9cbbcb468c729a4923d 100644 (file)
@@ -65,7 +65,7 @@ namespace {
     bool runOnBasicBlock(BasicBlock &BB);
   };
 
-  RegisterOpt<LowerAllocations>
+  RegisterPass<LowerAllocations>
   X("lowerallocs", "Lower allocations from instructions to calls");
 }
 
index 89a939ffcbcf73a43b04445688981a7c1053e869..8702810837c2aad7557b3210b5ed0e01be2c60d0 100644 (file)
@@ -94,7 +94,7 @@ namespace {
     unsigned JumpBufAlign;
   };
 
-  RegisterOpt<LowerInvoke>
+  RegisterPass<LowerInvoke>
   X("lowerinvoke", "Lower invoke and unwind, for unwindless code generators");
 }
 
index 464d30d03082bd3dee887ae061cc9e90fb9f8ebd..6859813b4768de16148fdf601b479bc6ede093a3 100644 (file)
@@ -50,7 +50,7 @@ namespace {
     bool runOnFunction(Function &F);
   };
 
-  RegisterOpt<LowerSelect>
+  RegisterPass<LowerSelect>
   X("lowerselect", "Lower select instructions to branches");
 }
 
index a7c85c80bfcc540b3ac86b73106b416aa282bc92..12a32f19cb0a299e1f04c2a6a68de71040139cf2 100644 (file)
@@ -68,7 +68,7 @@ namespace {
     }
   };
 
-  RegisterOpt<LowerSwitch>
+  RegisterPass<LowerSwitch>
   X("lowerswitch", "Lower SwitchInst's to branches");
 }
 
index 295c68ac1531a8b2b62bd087b3c1ea22ce05cfc4..f4ab50f08da45f0ae5ce4e7d65aa84a89da913e7 100644 (file)
@@ -48,7 +48,7 @@ namespace {
     }
   };
 
-  RegisterOpt<PromotePass> X("mem2reg", "Promote Memory to Register");
+  RegisterPass<PromotePass> X("mem2reg", "Promote Memory to Register");
 }  // end of anonymous namespace
 
 bool PromotePass::runOnFunction(Function &F) {
index fa4e38660f86e2db1c4971c7441b1294728080af..07512b94f48525bf9217fc8674c061091ee75838 100644 (file)
@@ -22,7 +22,7 @@
 #include "llvm/Type.h"
 using namespace llvm;
 
-static RegisterOpt<UnifyFunctionExitNodes>
+static RegisterPass<UnifyFunctionExitNodes>
 X("mergereturn", "Unify function exit nodes");
 
 int UnifyFunctionExitNodes::stub;
index 5553e2409ea4b8811c018a5c8b0aed551e58649e..890b5986874ad9aa5e5620b2132f47df8c8a5cae 100644 (file)
@@ -162,9 +162,9 @@ public:
 
 }  // end namespace llvm
 
-static RegisterOpt<PrintModulePass>
+static RegisterPass<PrintModulePass>
 X("printm", "Print module to stderr");
-static RegisterOpt<PrintFunctionPass>
+static RegisterPass<PrintFunctionPass>
 Y("print","Print function to stderr");
 
 static void WriteAsOperandInternal(std::ostream &Out, const Value *V,
index 359bd7bd13dd30a581e67ab357cd22a74a35faf8..606a43f075149f16ab79f0f0722806038cc2183c 100644 (file)
@@ -239,7 +239,7 @@ namespace {  // Anonymous namespace for class
     }
   };
 
-  RegisterOpt<Verifier> X("verify", "Module Verifier");
+  RegisterPass<Verifier> X("verify", "Module Verifier");
 } // End anonymous namespace
 
 
index d451b441f900d72fcf1182516065467fc25ba7be..c172946e472218d2185c58d764f1654d83b975be 100644 (file)
@@ -420,7 +420,7 @@ namespace {
   class BlockExtractorPass : public ModulePass {
     bool runOnModule(Module &M);
   };
-  RegisterOpt<BlockExtractorPass>
+  RegisterPass<BlockExtractorPass>
   XX("extract-bbs", "Extract Basic Blocks From Module (for bugpoint use)");
 }