diff options
Diffstat (limited to 'lib/Transforms')
57 files changed, 84 insertions, 79 deletions
diff --git a/lib/Transforms/Hello/Hello.cpp b/lib/Transforms/Hello/Hello.cpp index 804c3a70b2..cfa879a32d 100644 --- a/lib/Transforms/Hello/Hello.cpp +++ b/lib/Transforms/Hello/Hello.cpp @@ -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)"); } diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index 960e36ba54..5183d43bc7 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -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() { diff --git a/lib/Transforms/IPO/ConstantMerge.cpp b/lib/Transforms/IPO/ConstantMerge.cpp index 220d0d8722..aca42fe23b 100644 --- a/lib/Transforms/IPO/ConstantMerge.cpp +++ b/lib/Transforms/IPO/ConstantMerge.cpp @@ -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(); } diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index e1feed922e..08d92a5c63 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -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 diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp index 005d6bd600..57e5fa3109 100644 --- a/lib/Transforms/IPO/DeadTypeElimination.cpp +++ b/lib/Transforms/IPO/DeadTypeElimination.cpp @@ -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"); } diff --git a/lib/Transforms/IPO/FunctionResolution.cpp b/lib/Transforms/IPO/FunctionResolution.cpp index d8b1a862ea..a514b92b5f 100644 --- a/lib/Transforms/IPO/FunctionResolution.cpp +++ b/lib/Transforms/IPO/FunctionResolution.cpp @@ -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; diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp index 072cef2eb5..07296cfa5e 100644 --- a/lib/Transforms/IPO/GlobalDCE.cpp +++ b/lib/Transforms/IPO/GlobalDCE.cpp @@ -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(); } diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 0521779731..8324b432e8 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -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)){ diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp index 02395b5548..4713fb6aea 100644 --- a/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/lib/Transforms/IPO/IPConstantPropagation.cpp @@ -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()); diff --git a/lib/Transforms/IPO/IndMemRemoval.cpp b/lib/Transforms/IPO/IndMemRemoval.cpp index b5d0195a29..78b6ea53e3 100644 --- a/lib/Transforms/IPO/IndMemRemoval.cpp +++ b/lib/Transforms/IPO/IndMemRemoval.cpp @@ -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 diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp index 4a41bb6af5..6436684835 100644 --- a/lib/Transforms/IPO/InlineSimple.cpp +++ b/lib/Transforms/IPO/InlineSimple.cpp @@ -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(); } diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp index f1e1e9cc58..2eec95ff61 100644 --- a/lib/Transforms/IPO/Internalize.cpp +++ b/lib/Transforms/IPO/Internalize.cpp @@ -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) diff --git a/lib/Transforms/IPO/LoopExtractor.cpp b/lib/Transforms/IPO/LoopExtractor.cpp index 39d0fca94f..a4ce585ef9 100644 --- a/lib/Transforms/IPO/LoopExtractor.cpp +++ b/lib/Transforms/IPO/LoopExtractor.cpp @@ -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)"); } diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp index 9dd9501f1c..8018553e4f 100644 --- a/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/lib/Transforms/IPO/LowerSetJmp.cpp @@ -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 diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index d536965518..8ba0ac0402 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -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(); } diff --git a/lib/Transforms/IPO/RaiseAllocations.cpp b/lib/Transforms/IPO/RaiseAllocations.cpp index 2b487d009d..188b7f527f 100644 --- a/lib/Transforms/IPO/RaiseAllocations.cpp +++ b/lib/Transforms/IPO/RaiseAllocations.cpp @@ -44,7 +44,7 @@ namespace { 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 d8415d74b8..79cdf28e0a 100644 --- a/lib/Transforms/IPO/SimplifyLibCalls.cpp +++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp @@ -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 diff --git a/lib/Transforms/IPO/StripSymbols.cpp b/lib/Transforms/IPO/StripSymbols.cpp index da5e8a4844..75b24a7282 100644 --- a/lib/Transforms/IPO/StripSymbols.cpp +++ b/lib/Transforms/IPO/StripSymbols.cpp @@ -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 diff --git a/lib/Transforms/Instrumentation/BlockProfiling.cpp b/lib/Transforms/Instrumentation/BlockProfiling.cpp index 9a85fc50d1..859f596fa6 100644 --- a/lib/Transforms/Instrumentation/BlockProfiling.cpp +++ b/lib/Transforms/Instrumentation/BlockProfiling.cpp @@ -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; } diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp index 2ac6cc87de..a94c42dcaa 100644 --- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp +++ b/lib/Transforms/Instrumentation/EdgeProfiling.cpp @@ -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(); } diff --git a/lib/Transforms/Instrumentation/EmitFunctions.cpp b/lib/Transforms/Instrumentation/EmitFunctions.cpp index a49129399d..05c3419e29 100644 --- a/lib/Transforms/Instrumentation/EmitFunctions.cpp +++ b/lib/Transforms/Instrumentation/EmitFunctions.cpp @@ -40,7 +40,7 @@ namespace { bool runOnModule(Module &M); }; - RegisterOpt<EmitFunctionTable> + RegisterPass<EmitFunctionTable> X("emitfuncs", "Emit a function table for the reoptimizer"); } diff --git a/lib/Transforms/Instrumentation/RSProfiling.cpp b/lib/Transforms/Instrumentation/RSProfiling.cpp index 31c01ee886..984190a611 100644 --- a/lib/Transforms/Instrumentation/RSProfiling.cpp +++ b/lib/Transforms/Instrumentation/RSProfiling.cpp @@ -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 diff --git a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp index 66a1b22915..d3af056ffc 100644 --- a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp +++ b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp @@ -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"); } diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp index eba596b427..d335f16cad 100644 --- a/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/lib/Transforms/Instrumentation/TraceValues.cpp @@ -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 diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp index 9cbe3b813e..4c366bdd33 100644 --- a/lib/Transforms/LevelRaise.cpp +++ b/lib/Transforms/LevelRaise.cpp @@ -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"); } diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index bda8620969..8632c7ad58 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -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(); } diff --git a/lib/Transforms/Scalar/BasicBlockPlacement.cpp b/lib/Transforms/Scalar/BasicBlockPlacement.cpp index c926c561d8..492fba2bb4 100644 --- a/lib/Transforms/Scalar/BasicBlockPlacement.cpp +++ b/lib/Transforms/Scalar/BasicBlockPlacement.cpp @@ -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(); } diff --git a/lib/Transforms/Scalar/CondPropagate.cpp b/lib/Transforms/Scalar/CondPropagate.cpp index 49c87fd02f..5eb5abd9f8 100644 --- a/lib/Transforms/Scalar/CondPropagate.cpp +++ b/lib/Transforms/Scalar/CondPropagate.cpp @@ -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() { diff --git a/lib/Transforms/Scalar/ConstantProp.cpp b/lib/Transforms/Scalar/ConstantProp.cpp index 8955aee281..8f3baf913c 100644 --- a/lib/Transforms/Scalar/ConstantProp.cpp +++ b/lib/Transforms/Scalar/ConstantProp.cpp @@ -39,7 +39,8 @@ namespace { } }; - RegisterOpt<ConstantPropagation> X("constprop","Simple constant propagation"); + RegisterPass<ConstantPropagation> X("constprop", + "Simple constant propagation"); } FunctionPass *llvm::createConstantPropagationPass() { diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp index feae636dfe..722a224639 100644 --- a/lib/Transforms/Scalar/CorrelatedExprs.cpp +++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp @@ -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() { diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index 2783f12f05..a4a1104e92 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -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) { diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index d3f461d318..6684b21f99 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -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(); } diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp index 3d6e624811..7dbdf0ab96 100644 --- a/lib/Transforms/Scalar/GCSE.cpp +++ b/lib/Transforms/Scalar/GCSE.cpp @@ -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... diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 4287bd085a..dbaacaa7ac 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -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() { diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index f07d6a1edd..59e5acf9db 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -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... diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index 2ecf6aa046..a24b366e8d 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -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(); } diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index cfdba4e356..7f0248845d 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -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) { diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp index 676afb0e22..c1a510dcb5 100644 --- a/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/lib/Transforms/Scalar/LoopUnroll.cpp @@ -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(); } diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 8f049b8668..9c3655205b 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -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(); } diff --git a/lib/Transforms/Scalar/LowerGC.cpp b/lib/Transforms/Scalar/LowerGC.cpp index aa599ecc2b..851009c7d6 100644 --- a/lib/Transforms/Scalar/LowerGC.cpp +++ b/lib/Transforms/Scalar/LowerGC.cpp @@ -56,7 +56,7 @@ namespace { const StructType *getRootRecordType(unsigned NumRoots); }; - RegisterOpt<LowerGC> + RegisterPass<LowerGC> X("lowergc", "Lower GC intrinsics, for GCless code generators"); } diff --git a/lib/Transforms/Scalar/LowerPacked.cpp b/lib/Transforms/Scalar/LowerPacked.cpp index b24460c988..79a55ee876 100644 --- a/lib/Transforms/Scalar/LowerPacked.cpp +++ b/lib/Transforms/Scalar/LowerPacked.cpp @@ -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"); diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp index 353cd1435a..250d62b126 100644 --- a/lib/Transforms/Scalar/Reassociate.cpp +++ b/lib/Transforms/Scalar/Reassociate.cpp @@ -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 diff --git a/lib/Transforms/Scalar/Reg2Mem.cpp b/lib/Transforms/Scalar/Reg2Mem.cpp index 0b16ab9ac8..10d05ee701 100644 --- a/lib/Transforms/Scalar/Reg2Mem.cpp +++ b/lib/Transforms/Scalar/Reg2Mem.cpp @@ -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. diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 9328a251d8..31d084053c 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -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 diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index 9ddc634f56..9fffd40039 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -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 diff --git a/lib/Transforms/Scalar/SimplifyCFG.cpp b/lib/Transforms/Scalar/SimplifyCFG.cpp index 8b9c518de9..6b42f1c35a 100644 --- a/lib/Transforms/Scalar/SimplifyCFG.cpp +++ b/lib/Transforms/Scalar/SimplifyCFG.cpp @@ -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 diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp index 0bd5926539..acf0db0ebe 100644 --- a/lib/Transforms/Scalar/TailDuplication.cpp +++ b/lib/Transforms/Scalar/TailDuplication.cpp @@ -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 diff --git a/lib/Transforms/Scalar/TailRecursionElimination.cpp b/lib/Transforms/Scalar/TailRecursionElimination.cpp index 99c1f10865..5b46007e42 100644 --- a/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -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 diff --git a/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp index cc822dae86..01811cf2fe 100644 --- a/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp @@ -47,7 +47,7 @@ namespace { } }; - RegisterOpt<BreakCriticalEdges> X("break-crit-edges", + RegisterPass<BreakCriticalEdges> X("break-crit-edges", "Break critical edges in CFG"); } diff --git a/lib/Transforms/Utils/LCSSA.cpp b/lib/Transforms/Utils/LCSSA.cpp index 21f9352637..6f93ac6fce 100644 --- a/lib/Transforms/Utils/LCSSA.cpp +++ b/lib/Transforms/Utils/LCSSA.cpp @@ -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(); } diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index 88e75b76ec..7041282100 100644 --- a/lib/Transforms/Utils/LoopSimplify.cpp +++ b/lib/Transforms/Utils/LoopSimplify.cpp @@ -89,7 +89,7 @@ namespace { std::vector<BasicBlock*> &PredBlocks); }; - RegisterOpt<LoopSimplify> + RegisterPass<LoopSimplify> X("loopsimplify", "Canonicalize natural loops", true); } diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index 8eec021b08..451df70fef 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -65,7 +65,7 @@ namespace { bool runOnBasicBlock(BasicBlock &BB); }; - RegisterOpt<LowerAllocations> + RegisterPass<LowerAllocations> X("lowerallocs", "Lower allocations from instructions to calls"); } diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index 89a939ffcb..8702810837 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -94,7 +94,7 @@ namespace { unsigned JumpBufAlign; }; - RegisterOpt<LowerInvoke> + RegisterPass<LowerInvoke> X("lowerinvoke", "Lower invoke and unwind, for unwindless code generators"); } diff --git a/lib/Transforms/Utils/LowerSelect.cpp b/lib/Transforms/Utils/LowerSelect.cpp index 464d30d030..6859813b47 100644 --- a/lib/Transforms/Utils/LowerSelect.cpp +++ b/lib/Transforms/Utils/LowerSelect.cpp @@ -50,7 +50,7 @@ namespace { bool runOnFunction(Function &F); }; - RegisterOpt<LowerSelect> + RegisterPass<LowerSelect> X("lowerselect", "Lower select instructions to branches"); } diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp index a7c85c80bf..12a32f19cb 100644 --- a/lib/Transforms/Utils/LowerSwitch.cpp +++ b/lib/Transforms/Utils/LowerSwitch.cpp @@ -68,7 +68,7 @@ namespace { } }; - RegisterOpt<LowerSwitch> + RegisterPass<LowerSwitch> X("lowerswitch", "Lower SwitchInst's to branches"); } diff --git a/lib/Transforms/Utils/Mem2Reg.cpp b/lib/Transforms/Utils/Mem2Reg.cpp index 295c68ac15..f4ab50f08d 100644 --- a/lib/Transforms/Utils/Mem2Reg.cpp +++ b/lib/Transforms/Utils/Mem2Reg.cpp @@ -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) { diff --git a/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp b/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp index fa4e38660f..07512b94f4 100644 --- a/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp +++ b/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp @@ -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; |