From d13db2c59cc94162d6cf0a04187d408bfef6d4a7 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 21 Jul 2010 22:09:45 +0000 Subject: [PATCH] Fix batch of converting RegisterPass<> to INTIALIZE_PASS(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109045 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/AliasAnalysisEvaluator.cpp | 4 +- lib/Analysis/AliasSetTracker.cpp | 4 +- lib/Analysis/CFGPrinter.cpp | 3 +- lib/Analysis/DbgInfoPrinter.cpp | 4 +- lib/Analysis/DomPrinter.cpp | 49 ++++++++++--------- lib/Analysis/IVUsers.cpp | 3 +- lib/Analysis/InstCount.cpp | 4 +- lib/Analysis/IntervalPartition.cpp | 4 +- lib/Analysis/LazyValueInfo.cpp | 4 +- lib/Analysis/Lint.cpp | 3 +- lib/Analysis/LiveValues.cpp | 4 +- lib/Analysis/LoopDependenceAnalysis.cpp | 4 +- lib/Analysis/LoopInfo.cpp | 3 +- lib/Analysis/MemoryDependenceAnalysis.cpp | 4 +- lib/Analysis/ModuleDebugInfoPrinter.cpp | 5 +- lib/Analysis/PointerTracking.cpp | 4 +- lib/Analysis/PostDominators.cpp | 4 +- lib/Analysis/ProfileVerifierPass.cpp | 4 +- lib/Analysis/ScalarEvolution.cpp | 4 +- lib/CodeGen/CalcSpillWeights.cpp | 4 +- lib/CodeGen/DeadMachineInstructionElim.cpp | 5 +- lib/CodeGen/GCMetadata.cpp | 4 +- lib/CodeGen/IfConversion.cpp | 3 +- lib/CodeGen/LiveIntervalAnalysis.cpp | 3 +- lib/CodeGen/LiveStackAnalysis.cpp | 3 +- lib/CodeGen/LiveVariables.cpp | 3 +- lib/CodeGen/MachineCSE.cpp | 4 +- lib/CodeGen/MachineLICM.cpp | 4 +- lib/CodeGen/MachineModuleInfo.cpp | 4 +- lib/CodeGen/MachineSink.cpp | 4 +- lib/CodeGen/OptimizeExts.cpp | 4 +- lib/CodeGen/OptimizePHIs.cpp | 4 +- lib/CodeGen/ProcessImplicitDefs.cpp | 4 +- lib/CodeGen/PrologEpilogInserter.cpp | 4 +- lib/CodeGen/RegAllocLinearScan.cpp | 4 +- lib/CodeGen/RenderMachineFunction.cpp | 5 +- lib/CodeGen/SlotIndexes.cpp | 3 +- lib/CodeGen/Splitter.cpp | 4 +- lib/CodeGen/StackProtector.cpp | 4 +- lib/CodeGen/StackSlotColoring.cpp | 4 +- lib/CodeGen/UnreachableBlockElim.cpp | 4 +- lib/CodeGen/VirtRegMap.cpp | 3 +- lib/Target/TargetData.cpp | 3 +- lib/Transforms/Hello/Hello.cpp | 7 +-- lib/Transforms/IPO/ArgumentPromotion.cpp | 4 +- lib/Transforms/IPO/ConstantMerge.cpp | 4 +- .../IPO/DeadArgumentElimination.cpp | 8 +-- lib/Transforms/IPO/DeadTypeElimination.cpp | 2 +- lib/Transforms/IPO/FunctionAttrs.cpp | 4 +- lib/Transforms/IPO/GlobalDCE.cpp | 3 +- lib/Transforms/IPO/GlobalOpt.cpp | 3 +- lib/Transforms/IPO/IPConstantPropagation.cpp | 4 +- lib/Transforms/IPO/InlineAlways.cpp | 4 +- lib/Transforms/IPO/InlineSimple.cpp | 4 +- lib/Transforms/IPO/Internalize.cpp | 4 +- lib/Transforms/IPO/LoopExtractor.cpp | 13 ++--- lib/Transforms/IPO/LowerSetJmp.cpp | 2 +- lib/Transforms/IPO/MergeFunctions.cpp | 2 +- lib/Transforms/IPO/PartialInlining.cpp | 3 +- lib/Transforms/IPO/PartialSpecialization.cpp | 4 +- lib/Transforms/IPO/PruneEH.cpp | 4 +- lib/Transforms/IPO/StripDeadPrototypes.cpp | 4 +- lib/Transforms/IPO/StripSymbols.cpp | 17 ++++--- lib/Transforms/IPO/StructRetPromotion.cpp | 4 +- .../InstCombine/InstructionCombining.cpp | 4 +- .../Instrumentation/EdgeProfiling.cpp | 4 +- .../Instrumentation/OptimalEdgeProfiling.cpp | 6 +-- lib/Transforms/Scalar/ABCD.cpp | 5 +- lib/Transforms/Scalar/ADCE.cpp | 2 +- lib/Transforms/Scalar/BasicBlockPlacement.cpp | 4 +- lib/Transforms/Scalar/CodeGenPrepare.cpp | 4 +- lib/Transforms/Scalar/ConstantProp.cpp | 4 +- lib/Transforms/Scalar/DCE.cpp | 6 +-- .../Scalar/DeadStoreElimination.cpp | 2 +- lib/Transforms/Scalar/GEPSplitter.cpp | 4 +- lib/Transforms/Scalar/GVN.cpp | 3 +- lib/Transforms/Scalar/IndVarSimplify.cpp | 4 +- lib/Transforms/Scalar/JumpThreading.cpp | 4 +- lib/Transforms/Scalar/LICM.cpp | 2 +- lib/Transforms/Scalar/LoopDeletion.cpp | 3 +- lib/Transforms/Scalar/LoopIndexSplit.cpp | 4 +- lib/Transforms/Scalar/LoopRotation.cpp | 2 +- lib/Transforms/Scalar/LoopStrengthReduce.cpp | 4 +- lib/Transforms/Scalar/LoopUnrollPass.cpp | 2 +- lib/Transforms/Scalar/LoopUnswitch.cpp | 2 +- lib/Transforms/Scalar/MemCpyOptimizer.cpp | 3 +- lib/Transforms/Scalar/Reassociate.cpp | 3 +- lib/Transforms/Scalar/SCCP.cpp | 9 ++-- .../Scalar/ScalarReplAggregates.cpp | 3 +- lib/Transforms/Scalar/SimplifyCFGPass.cpp | 3 +- .../Scalar/SimplifyHalfPowrLibCalls.cpp | 4 +- lib/Transforms/Scalar/SimplifyLibCalls.cpp | 4 +- lib/Transforms/Scalar/Sink.cpp | 3 +- lib/Transforms/Scalar/TailDuplication.cpp | 2 +- .../Scalar/TailRecursionElimination.cpp | 3 +- lib/Transforms/Utils/SSI.cpp | 7 +-- .../Utils/UnifyFunctionExitNodes.cpp | 4 +- lib/VMCore/Dominators.cpp | 8 +-- lib/VMCore/PrintModulePass.cpp | 8 +-- 99 files changed, 230 insertions(+), 222 deletions(-) diff --git a/lib/Analysis/AliasAnalysisEvaluator.cpp b/lib/Analysis/AliasAnalysisEvaluator.cpp index 37ee9fc22c9..8bd4b328911 100644 --- a/lib/Analysis/AliasAnalysisEvaluator.cpp +++ b/lib/Analysis/AliasAnalysisEvaluator.cpp @@ -74,8 +74,8 @@ namespace { } char AAEval::ID = 0; -static RegisterPass -X("aa-eval", "Exhaustive Alias Analysis Precision Evaluator", false, true); +INITIALIZE_PASS(AAEval, "aa-eval", + "Exhaustive Alias Analysis Precision Evaluator", false, true); FunctionPass *llvm::createAAEvalPass() { return new AAEval(); } diff --git a/lib/Analysis/AliasSetTracker.cpp b/lib/Analysis/AliasSetTracker.cpp index 02aff50d8a1..b14043e5829 100644 --- a/lib/Analysis/AliasSetTracker.cpp +++ b/lib/Analysis/AliasSetTracker.cpp @@ -600,5 +600,5 @@ namespace { } char AliasSetPrinter::ID = 0; -static RegisterPass -X("print-alias-sets", "Alias Set Printer", false, true); +INITIALIZE_PASS(AliasSetPrinter, "print-alias-sets", + "Alias Set Printer", false, true); diff --git a/lib/Analysis/CFGPrinter.cpp b/lib/Analysis/CFGPrinter.cpp index e06704bd897..c16f3286df2 100644 --- a/lib/Analysis/CFGPrinter.cpp +++ b/lib/Analysis/CFGPrinter.cpp @@ -41,8 +41,7 @@ namespace { } char CFGViewer::ID = 0; -static RegisterPass -V0("view-cfg", "View CFG of function", false, true); +INITIALIZE_PASS(CFGViewer, "view-cfg", "View CFG of function", false, true); namespace { struct CFGOnlyViewer : public FunctionPass { diff --git a/lib/Analysis/DbgInfoPrinter.cpp b/lib/Analysis/DbgInfoPrinter.cpp index 3532b052dc5..aef79787715 100644 --- a/lib/Analysis/DbgInfoPrinter.cpp +++ b/lib/Analysis/DbgInfoPrinter.cpp @@ -48,8 +48,8 @@ namespace { } }; char PrintDbgInfo::ID = 0; - static RegisterPass X("print-dbginfo", - "Print debug info in human readable form"); + INITIALIZE_PASS(PrintDbgInfo, "print-dbginfo", + "Print debug info in human readable form", false, false); } FunctionPass *llvm::createDbgInfoPrinterPass() { return new PrintDbgInfo(); } diff --git a/lib/Analysis/DomPrinter.cpp b/lib/Analysis/DomPrinter.cpp index d95c3761bee..83e39f1e6fc 100644 --- a/lib/Analysis/DomPrinter.cpp +++ b/lib/Analysis/DomPrinter.cpp @@ -111,22 +111,23 @@ struct PostDomOnlyViewer } // end anonymous namespace char DomViewer::ID = 0; -RegisterPass A("view-dom", - "View dominance tree of function"); +INITIALIZE_PASS(DomViewer, "view-dom", + "View dominance tree of function", false, false); char DomOnlyViewer::ID = 0; -RegisterPass B("view-dom-only", - "View dominance tree of function " - "(with no function bodies)"); +INITIALIZE_PASS(DomOnlyViewer, "view-dom-only", + "View dominance tree of function (with no function bodies)", + false, false); char PostDomViewer::ID = 0; -RegisterPass C("view-postdom", - "View postdominance tree of function"); +INITIALIZE_PASS(PostDomViewer, "view-postdom", + "View postdominance tree of function", false, false); char PostDomOnlyViewer::ID = 0; -RegisterPass D("view-postdom-only", - "View postdominance tree of function " - "(with no function bodies)"); +INITIALIZE_PASS(PostDomOnlyViewer, "view-postdom-only", + "View postdominance tree of function " + "(with no function bodies)", + false, false); namespace { struct DomPrinter @@ -159,26 +160,26 @@ struct PostDomOnlyPrinter char DomPrinter::ID = 0; -RegisterPass E("dot-dom", - "Print dominance tree of function " - "to 'dot' file"); +INITIALIZE_PASS(DomPrinter, "dot-dom", + "Print dominance tree of function to 'dot' file", + false, false); char DomOnlyPrinter::ID = 0; -RegisterPass F("dot-dom-only", - "Print dominance tree of function " - "to 'dot' file " - "(with no function bodies)"); +INITIALIZE_PASS(DomOnlyPrinter, "dot-dom-only", + "Print dominance tree of function to 'dot' file " + "(with no function bodies)", + false, false); char PostDomPrinter::ID = 0; -RegisterPass G("dot-postdom", - "Print postdominance tree of function " - "to 'dot' file"); +INITIALIZE_PASS(PostDomPrinter, "dot-postdom", + "Print postdominance tree of function to 'dot' file", + false, false); char PostDomOnlyPrinter::ID = 0; -RegisterPass H("dot-postdom-only", - "Print postdominance tree of function " - "to 'dot' file " - "(with no function bodies)"); +INITIALIZE_PASS(PostDomOnlyPrinter, "dot-postdom-only", + "Print postdominance tree of function to 'dot' file " + "(with no function bodies)", + false, false); // Create methods available outside of this file, to use them // "include/llvm/LinkAllPasses.h". Otherwise the pass would be deleted by diff --git a/lib/Analysis/IVUsers.cpp b/lib/Analysis/IVUsers.cpp index 2c997dae585..e2b67e8365e 100644 --- a/lib/Analysis/IVUsers.cpp +++ b/lib/Analysis/IVUsers.cpp @@ -29,8 +29,7 @@ using namespace llvm; char IVUsers::ID = 0; -static RegisterPass -X("iv-users", "Induction Variable Users", false, true); +INITIALIZE_PASS(IVUsers, "iv-users", "Induction Variable Users", false, true); Pass *llvm::createIVUsersPass() { return new IVUsers(); diff --git a/lib/Analysis/InstCount.cpp b/lib/Analysis/InstCount.cpp index bb2cf53c85e..6133b8827b3 100644 --- a/lib/Analysis/InstCount.cpp +++ b/lib/Analysis/InstCount.cpp @@ -64,8 +64,8 @@ namespace { } char InstCount::ID = 0; -static RegisterPass -X("instcount", "Counts the various types of Instructions", false, true); +INITIALIZE_PASS(InstCount, "instcount", + "Counts the various types of Instructions", false, true); FunctionPass *llvm::createInstCountPass() { return new InstCount(); } diff --git a/lib/Analysis/IntervalPartition.cpp b/lib/Analysis/IntervalPartition.cpp index 1f17b77a5b9..0f11e34b600 100644 --- a/lib/Analysis/IntervalPartition.cpp +++ b/lib/Analysis/IntervalPartition.cpp @@ -16,8 +16,8 @@ using namespace llvm; char IntervalPartition::ID = 0; -static RegisterPass -X("intervals", "Interval Partition Construction", true, true); +INITIALIZE_PASS(IntervalPartition, "intervals", + "Interval Partition Construction", true, true); //===----------------------------------------------------------------------===// // IntervalPartition Implementation diff --git a/lib/Analysis/LazyValueInfo.cpp b/lib/Analysis/LazyValueInfo.cpp index ff9026bede9..4a6885e0e46 100644 --- a/lib/Analysis/LazyValueInfo.cpp +++ b/lib/Analysis/LazyValueInfo.cpp @@ -27,8 +27,8 @@ using namespace llvm; char LazyValueInfo::ID = 0; -static RegisterPass -X("lazy-value-info", "Lazy Value Information Analysis", false, true); +INITIALIZE_PASS(LazyValueInfo, "lazy-value-info", + "Lazy Value Information Analysis", false, true); namespace llvm { FunctionPass *createLazyValueInfoPass() { return new LazyValueInfo(); } diff --git a/lib/Analysis/Lint.cpp b/lib/Analysis/Lint.cpp index 9f1b30d2cf4..949bbbd8b6c 100644 --- a/lib/Analysis/Lint.cpp +++ b/lib/Analysis/Lint.cpp @@ -167,8 +167,7 @@ namespace { } char Lint::ID = 0; -static RegisterPass -X("lint", "Statically lint-checks LLVM IR", false, true); +INITIALIZE_PASS(Lint, "lint", "Statically lint-checks LLVM IR", false, true); // Assert - We know that cond should be true, if not print an error message. #define Assert(C, M) \ diff --git a/lib/Analysis/LiveValues.cpp b/lib/Analysis/LiveValues.cpp index 23964ffc457..3cc58c4feef 100644 --- a/lib/Analysis/LiveValues.cpp +++ b/lib/Analysis/LiveValues.cpp @@ -22,8 +22,8 @@ namespace llvm { } char LiveValues::ID = 0; -static RegisterPass -X("live-values", "Value Liveness Analysis", false, true); +INITIALIZE_PASS(LiveValues, "live-values", + "Value Liveness Analysis", false, true); LiveValues::LiveValues() : FunctionPass(&ID) {} diff --git a/lib/Analysis/LoopDependenceAnalysis.cpp b/lib/Analysis/LoopDependenceAnalysis.cpp index e1019474cf4..82c02dcd134 100644 --- a/lib/Analysis/LoopDependenceAnalysis.cpp +++ b/lib/Analysis/LoopDependenceAnalysis.cpp @@ -46,8 +46,8 @@ LoopPass *llvm::createLoopDependenceAnalysisPass() { return new LoopDependenceAnalysis(); } -static RegisterPass -R("lda", "Loop Dependence Analysis", false, true); +INITIALIZE_PASS(LoopDependenceAnalysis, "lda", + "Loop Dependence Analysis", false, true); char LoopDependenceAnalysis::ID = 0; //===----------------------------------------------------------------------===// diff --git a/lib/Analysis/LoopInfo.cpp b/lib/Analysis/LoopInfo.cpp index 818d0a9dd11..3d8b9198e1b 100644 --- a/lib/Analysis/LoopInfo.cpp +++ b/lib/Analysis/LoopInfo.cpp @@ -38,8 +38,7 @@ VerifyLoopInfoX("verify-loop-info", cl::location(VerifyLoopInfo), cl::desc("Verify loop info (time consuming)")); char LoopInfo::ID = 0; -static RegisterPass -X("loops", "Natural Loop Information", true, true); +INITIALIZE_PASS(LoopInfo, "loops", "Natural Loop Information", true, true); //===----------------------------------------------------------------------===// // Loop implementation diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index 1f54d740db9..947a810b82b 100644 --- a/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -46,8 +46,8 @@ STATISTIC(NumCacheCompleteNonLocalPtr, char MemoryDependenceAnalysis::ID = 0; // Register this pass... -static RegisterPass X("memdep", - "Memory Dependence Analysis", false, true); +INITIALIZE_PASS(MemoryDependenceAnalysis, "memdep", + "Memory Dependence Analysis", false, true); MemoryDependenceAnalysis::MemoryDependenceAnalysis() : FunctionPass(&ID), PredCache(0) { diff --git a/lib/Analysis/ModuleDebugInfoPrinter.cpp b/lib/Analysis/ModuleDebugInfoPrinter.cpp index 556d4c8aab5..cf8988a403c 100644 --- a/lib/Analysis/ModuleDebugInfoPrinter.cpp +++ b/lib/Analysis/ModuleDebugInfoPrinter.cpp @@ -42,9 +42,8 @@ namespace { } char ModuleDebugInfoPrinter::ID = 0; -static RegisterPass -X("module-debuginfo", - "Decodes module-level debug info", false, true); +INITIALIZE_PASS(ModuleDebugInfoPrinter, "module-debuginfo", + "Decodes module-level debug info", false, true); ModulePass *llvm::createModuleDebugInfoPrinterPass() { return new ModuleDebugInfoPrinter(); diff --git a/lib/Analysis/PointerTracking.cpp b/lib/Analysis/PointerTracking.cpp index 14df0b71987..142066e42ba 100644 --- a/lib/Analysis/PointerTracking.cpp +++ b/lib/Analysis/PointerTracking.cpp @@ -263,5 +263,5 @@ void PointerTracking::print(raw_ostream &OS, const Module* M) const { } } -static RegisterPass X("pointertracking", - "Track pointer bounds", false, true); +INITIALIZE_PASS(PointerTracking, "pointertracking", + "Track pointer bounds", false, true); diff --git a/lib/Analysis/PostDominators.cpp b/lib/Analysis/PostDominators.cpp index 7354afa181b..51eb1452580 100644 --- a/lib/Analysis/PostDominators.cpp +++ b/lib/Analysis/PostDominators.cpp @@ -28,8 +28,8 @@ using namespace llvm; char PostDominatorTree::ID = 0; char PostDominanceFrontier::ID = 0; -static RegisterPass -F("postdomtree", "Post-Dominator Tree Construction", true, true); +INITIALIZE_PASS(PostDominatorTree, "postdomtree", + "Post-Dominator Tree Construction", true, true); bool PostDominatorTree::runOnFunction(Function &F) { DT->recalculate(F); diff --git a/lib/Analysis/ProfileVerifierPass.cpp b/lib/Analysis/ProfileVerifierPass.cpp index 5d87e14a97b..dc1f28a95ae 100644 --- a/lib/Analysis/ProfileVerifierPass.cpp +++ b/lib/Analysis/ProfileVerifierPass.cpp @@ -366,8 +366,8 @@ namespace llvm { char ProfileVerifierPassT::ID = 0; } -static RegisterPass -X("profile-verifier", "Verify profiling information", false, true); +INITIALIZE_PASS(ProfileVerifierPass, "profile-verifier", + "Verify profiling information", false, true); namespace llvm { FunctionPass *createProfileVerifierPass() { diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 179aa8867d6..3c67a348fe8 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -103,8 +103,8 @@ MaxBruteForceIterations("scalar-evolution-max-iterations", cl::ReallyHidden, "derived loop"), cl::init(100)); -static RegisterPass -R("scalar-evolution", "Scalar Evolution Analysis", false, true); +INITIALIZE_PASS(ScalarEvolution, "scalar-evolution", + "Scalar Evolution Analysis", false, true); char ScalarEvolution::ID = 0; //===----------------------------------------------------------------------===// diff --git a/lib/CodeGen/CalcSpillWeights.cpp b/lib/CodeGen/CalcSpillWeights.cpp index d067c05e572..0703d6527d3 100644 --- a/lib/CodeGen/CalcSpillWeights.cpp +++ b/lib/CodeGen/CalcSpillWeights.cpp @@ -25,8 +25,8 @@ using namespace llvm; char CalculateSpillWeights::ID = 0; -static RegisterPass X("calcspillweights", - "Calculate spill weights"); +INITIALIZE_PASS(CalculateSpillWeights, "calcspillweights", + "Calculate spill weights", false, false); void CalculateSpillWeights::getAnalysisUsage(AnalysisUsage &au) const { au.addRequired(); diff --git a/lib/CodeGen/DeadMachineInstructionElim.cpp b/lib/CodeGen/DeadMachineInstructionElim.cpp index d69c995b3e0..2f5b6dd31bc 100644 --- a/lib/CodeGen/DeadMachineInstructionElim.cpp +++ b/lib/CodeGen/DeadMachineInstructionElim.cpp @@ -44,9 +44,8 @@ namespace { } char DeadMachineInstructionElim::ID = 0; -static RegisterPass -Y("dead-mi-elimination", - "Remove dead machine instructions"); +INITIALIZE_PASS(DeadMachineInstructionElim, "dead-mi-elimination", + "Remove dead machine instructions", false, false); FunctionPass *llvm::createDeadMachineInstructionElimPass() { return new DeadMachineInstructionElim(); diff --git a/lib/CodeGen/GCMetadata.cpp b/lib/CodeGen/GCMetadata.cpp index ab0a8002253..32bc7d785b6 100644 --- a/lib/CodeGen/GCMetadata.cpp +++ b/lib/CodeGen/GCMetadata.cpp @@ -55,8 +55,8 @@ namespace { } -static RegisterPass -X("collector-metadata", "Create Garbage Collector Module Metadata"); +INITIALIZE_PASS(GCModuleInfo, "collector-metadata", + "Create Garbage Collector Module Metadata", false, false); // ----------------------------------------------------------------------------- diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp index 6b445e0b8e0..6c064a74cd0 100644 --- a/lib/CodeGen/IfConversion.cpp +++ b/lib/CodeGen/IfConversion.cpp @@ -230,8 +230,7 @@ namespace { char IfConverter::ID = 0; } -static RegisterPass -X("if-converter", "If Converter"); +INITIALIZE_PASS(IfConverter, "if-converter", "If Converter", false, false); FunctionPass *llvm::createIfConverterPass() { return new IfConverter(); } diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 9e65edb5be4..67968b3525b 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -55,7 +55,8 @@ STATISTIC(numFolds , "Number of loads/stores folded into instructions"); STATISTIC(numSplits , "Number of intervals split"); char LiveIntervals::ID = 0; -static RegisterPass X("liveintervals", "Live Interval Analysis"); +INITIALIZE_PASS(LiveIntervals, "liveintervals", + "Live Interval Analysis", false, false); void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); diff --git a/lib/CodeGen/LiveStackAnalysis.cpp b/lib/CodeGen/LiveStackAnalysis.cpp index 709e2c6d5ca..b5c385f7723 100644 --- a/lib/CodeGen/LiveStackAnalysis.cpp +++ b/lib/CodeGen/LiveStackAnalysis.cpp @@ -25,7 +25,8 @@ using namespace llvm; char LiveStacks::ID = 0; -static RegisterPass X("livestacks", "Live Stack Slot Analysis"); +INITIALIZE_PASS(LiveStacks, "livestacks", + "Live Stack Slot Analysis", false, false); void LiveStacks::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp index 41b891d30f2..1d935b20739 100644 --- a/lib/CodeGen/LiveVariables.cpp +++ b/lib/CodeGen/LiveVariables.cpp @@ -42,7 +42,8 @@ using namespace llvm; char LiveVariables::ID = 0; -static RegisterPass X("livevars", "Live Variable Analysis"); +INITIALIZE_PASS(LiveVariables, "livevars", + "Live Variable Analysis", false, false); void LiveVariables::getAnalysisUsage(AnalysisUsage &AU) const { diff --git a/lib/CodeGen/MachineCSE.cpp b/lib/CodeGen/MachineCSE.cpp index aa3a10290ba..ef4919239b9 100644 --- a/lib/CodeGen/MachineCSE.cpp +++ b/lib/CodeGen/MachineCSE.cpp @@ -85,8 +85,8 @@ namespace { } // end anonymous namespace char MachineCSE::ID = 0; -static RegisterPass -X("machine-cse", "Machine Common Subexpression Elimination"); +INITIALIZE_PASS(MachineCSE, "machine-cse", + "Machine Common Subexpression Elimination", false, false); FunctionPass *llvm::createMachineCSEPass() { return new MachineCSE(); } diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp index 9409d88baf6..ee498479488 100644 --- a/lib/CodeGen/MachineLICM.cpp +++ b/lib/CodeGen/MachineLICM.cpp @@ -189,8 +189,8 @@ namespace { } // end anonymous namespace char MachineLICM::ID = 0; -static RegisterPass -X("machinelicm", "Machine Loop Invariant Code Motion"); +INITIALIZE_PASS(MachineLICM, "machinelicm", + "Machine Loop Invariant Code Motion", false, false); FunctionPass *llvm::createMachineLICMPass(bool PreRegAlloc) { return new MachineLICM(PreRegAlloc); diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index 8d5f6d301d4..d2e3bf74641 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -28,8 +28,8 @@ using namespace llvm; using namespace llvm::dwarf; // Handle the Pass registration stuff necessary to use TargetData's. -static RegisterPass -X("machinemoduleinfo", "Machine Module Information"); +INITIALIZE_PASS(MachineModuleInfo, "machinemoduleinfo", + "Machine Module Information", false, false); char MachineModuleInfo::ID = 0; // Out of line virtual method. diff --git a/lib/CodeGen/MachineSink.cpp b/lib/CodeGen/MachineSink.cpp index 61334fc1790..d1f91f271b9 100644 --- a/lib/CodeGen/MachineSink.cpp +++ b/lib/CodeGen/MachineSink.cpp @@ -65,8 +65,8 @@ namespace { } // end anonymous namespace char MachineSinking::ID = 0; -static RegisterPass -X("machine-sink", "Machine code sinking"); +INITIALIZE_PASS(MachineSinking, "machine-sink", + "Machine code sinking", false, false); FunctionPass *llvm::createMachineSinkingPass() { return new MachineSinking(); } diff --git a/lib/CodeGen/OptimizeExts.cpp b/lib/CodeGen/OptimizeExts.cpp index dcdc243e5db..49739112702 100644 --- a/lib/CodeGen/OptimizeExts.cpp +++ b/lib/CodeGen/OptimizeExts.cpp @@ -63,8 +63,8 @@ namespace { } char OptimizeExts::ID = 0; -static RegisterPass -X("opt-exts", "Optimize sign / zero extensions"); +INITIALIZE_PASS(OptimizeExts, "opt-exts", + "Optimize sign / zero extensions", false, false); FunctionPass *llvm::createOptimizeExtsPass() { return new OptimizeExts(); } diff --git a/lib/CodeGen/OptimizePHIs.cpp b/lib/CodeGen/OptimizePHIs.cpp index 9b7a4ea21e5..d27cc42319c 100644 --- a/lib/CodeGen/OptimizePHIs.cpp +++ b/lib/CodeGen/OptimizePHIs.cpp @@ -54,8 +54,8 @@ namespace { } char OptimizePHIs::ID = 0; -static RegisterPass -X("opt-phis", "Optimize machine instruction PHIs"); +INITIALIZE_PASS(OptimizePHIs, "opt-phis", + "Optimize machine instruction PHIs", false, false); FunctionPass *llvm::createOptimizePHIsPass() { return new OptimizePHIs(); } diff --git a/lib/CodeGen/ProcessImplicitDefs.cpp b/lib/CodeGen/ProcessImplicitDefs.cpp index 023af7923d0..b8831db1d11 100644 --- a/lib/CodeGen/ProcessImplicitDefs.cpp +++ b/lib/CodeGen/ProcessImplicitDefs.cpp @@ -26,8 +26,8 @@ using namespace llvm; char ProcessImplicitDefs::ID = 0; -static RegisterPass X("processimpdefs", - "Process Implicit Definitions."); +INITIALIZE_PASS(ProcessImplicitDefs, "processimpdefs", + "Process Implicit Definitions.", false, false); void ProcessImplicitDefs::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index 3843b253705..3787d0b7bed 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -40,8 +40,8 @@ using namespace llvm; char PEI::ID = 0; -static RegisterPass -X("prologepilog", "Prologue/Epilogue Insertion"); +INITIALIZE_PASS(PEI, "prologepilog", + "Prologue/Epilogue Insertion", false, false); /// createPrologEpilogCodeInserter - This function returns a pass that inserts /// prolog and epilog code, and eliminates abstract frame references. diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index 2d6184c943b..9919bb3c603 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -358,8 +358,8 @@ namespace { char RALinScan::ID = 0; } -static RegisterPass -X("linearscan-regalloc", "Linear Scan Register Allocator"); +INITIALIZE_PASS(RALinScan, "linearscan-regalloc", + "Linear Scan Register Allocator", false, false); void RALinScan::ComputeRelatedRegClasses() { // First pass, add all reg classes to the union, and determine at least one diff --git a/lib/CodeGen/RenderMachineFunction.cpp b/lib/CodeGen/RenderMachineFunction.cpp index 9bcbfb40d35..585bf041990 100644 --- a/lib/CodeGen/RenderMachineFunction.cpp +++ b/lib/CodeGen/RenderMachineFunction.cpp @@ -30,8 +30,9 @@ using namespace llvm; char RenderMachineFunction::ID = 0; -static RegisterPass -X("rendermf", "Render machine functions (and related info) to HTML pages"); +INITIALIZE_PASS(RenderMachineFunction, "rendermf", + "Render machine functions (and related info) to HTML pages", + false, false); static cl::opt outputFileSuffix("rmf-file-suffix", diff --git a/lib/CodeGen/SlotIndexes.cpp b/lib/CodeGen/SlotIndexes.cpp index 7a227cf02d5..1bc148f160b 100644 --- a/lib/CodeGen/SlotIndexes.cpp +++ b/lib/CodeGen/SlotIndexes.cpp @@ -40,7 +40,8 @@ namespace { } char SlotIndexes::ID = 0; -static RegisterPass X("slotindexes", "Slot index numbering"); +INITIALIZE_PASS(SlotIndexes, "slotindexes", + "Slot index numbering", false, false); IndexListEntry* IndexListEntry::getEmptyKeyEntry() { return &*IndexListEntryEmptyKey; diff --git a/lib/CodeGen/Splitter.cpp b/lib/CodeGen/Splitter.cpp index 09983f6dfa8..38f3b1f4d35 100644 --- a/lib/CodeGen/Splitter.cpp +++ b/lib/CodeGen/Splitter.cpp @@ -29,8 +29,8 @@ using namespace llvm; char LoopSplitter::ID = 0; -static RegisterPass -X("loop-splitting", "Split virtual regists across loop boundaries."); +INITIALIZE_PASS(LoopSplitter, "loop-splitting", + "Split virtual regists across loop boundaries.", false, false); namespace llvm { diff --git a/lib/CodeGen/StackProtector.cpp b/lib/CodeGen/StackProtector.cpp index ca5c28ce010..ff20f11e6e6 100644 --- a/lib/CodeGen/StackProtector.cpp +++ b/lib/CodeGen/StackProtector.cpp @@ -71,8 +71,8 @@ namespace { } // end anonymous namespace char StackProtector::ID = 0; -static RegisterPass -X("stack-protector", "Insert stack protectors"); +INITIALIZE_PASS(StackProtector, "stack-protector", + "Insert stack protectors", false, false); FunctionPass *llvm::createStackProtectorPass(const TargetLowering *tli) { return new StackProtector(tli); diff --git a/lib/CodeGen/StackSlotColoring.cpp b/lib/CodeGen/StackSlotColoring.cpp index eff3c33e3da..7da3d17a541 100644 --- a/lib/CodeGen/StackSlotColoring.cpp +++ b/lib/CodeGen/StackSlotColoring.cpp @@ -146,8 +146,8 @@ namespace { char StackSlotColoring::ID = 0; -static RegisterPass -X("stack-slot-coloring", "Stack Slot Coloring"); +INITIALIZE_PASS(StackSlotColoring, "stack-slot-coloring", + "Stack Slot Coloring", false, false); FunctionPass *llvm::createStackSlotColoringPass(bool RegColor) { return new StackSlotColoring(RegColor); diff --git a/lib/CodeGen/UnreachableBlockElim.cpp b/lib/CodeGen/UnreachableBlockElim.cpp index 7b338126d47..be1fd23e2fc 100644 --- a/lib/CodeGen/UnreachableBlockElim.cpp +++ b/lib/CodeGen/UnreachableBlockElim.cpp @@ -51,8 +51,8 @@ namespace { }; } char UnreachableBlockElim::ID = 0; -static RegisterPass -X("unreachableblockelim", "Remove unreachable blocks from the CFG"); +INITIALIZE_PASS(UnreachableBlockElim, "unreachableblockelim", + "Remove unreachable blocks from the CFG", false, false); FunctionPass *llvm::createUnreachableBlockEliminationPass() { return new UnreachableBlockElim(); diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index ed0269695df..20ffcffa70d 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -48,8 +48,7 @@ STATISTIC(NumSpills , "Number of register spills"); char VirtRegMap::ID = 0; -static RegisterPass -X("virtregmap", "Virtual Register Map"); +INITIALIZE_PASS(VirtRegMap, "virtregmap", "Virtual Register Map", false, false); bool VirtRegMap::runOnMachineFunction(MachineFunction &mf) { MRI = &mf.getRegInfo(); diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index 5870d8a8700..9b207c1f28c 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -34,8 +34,7 @@ using namespace llvm; // Handle the Pass registration stuff necessary to use TargetData's. // Register the default SparcV9 implementation... -static RegisterPass X("targetdata", "Target Data Layout", false, - true); +INITIALIZE_PASS(TargetData, "targetdata", "Target Data Layout", false, true); char TargetData::ID = 0; //===----------------------------------------------------------------------===// diff --git a/lib/Transforms/Hello/Hello.cpp b/lib/Transforms/Hello/Hello.cpp index abfa514e20c..bf59c044733 100644 --- a/lib/Transforms/Hello/Hello.cpp +++ b/lib/Transforms/Hello/Hello.cpp @@ -37,7 +37,7 @@ namespace { } char Hello::ID = 0; -static RegisterPass X("hello", "Hello World Pass"); +INITIALIZE_PASS(Hello, "hello", "Hello World Pass", false, false); namespace { // Hello2 - The second implementation with getAnalysisUsage implemented. @@ -60,5 +60,6 @@ namespace { } char Hello2::ID = 0; -static RegisterPass -Y("hello2", "Hello World Pass (with getAnalysisUsage implemented)"); +INITIALIZE_PASS(Hello2, "hello2", + "Hello World Pass (with getAnalysisUsage implemented)", + false, false); diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index 28ea079abd3..712deb467fb 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -84,8 +84,8 @@ namespace { } char ArgPromotion::ID = 0; -static RegisterPass -X("argpromotion", "Promote 'by reference' arguments to scalars"); +INITIALIZE_PASS(ArgPromotion, "argpromotion", + "Promote 'by reference' arguments to scalars", false, false); Pass *llvm::createArgumentPromotionPass(unsigned maxElements) { return new ArgPromotion(maxElements); diff --git a/lib/Transforms/IPO/ConstantMerge.cpp b/lib/Transforms/IPO/ConstantMerge.cpp index 3c05f88027a..5c6bc868c93 100644 --- a/lib/Transforms/IPO/ConstantMerge.cpp +++ b/lib/Transforms/IPO/ConstantMerge.cpp @@ -41,8 +41,8 @@ namespace { } char ConstantMerge::ID = 0; -static RegisterPass -X("constmerge", "Merge Duplicate Global Constants"); +INITIALIZE_PASS(ConstantMerge, "constmerge", + "Merge Duplicate Global Constants", false, false); ModulePass *llvm::createConstantMergePass() { return new ConstantMerge(); } diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index b71bf5ff468..c06d688b3c4 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -151,8 +151,7 @@ namespace { char DAE::ID = 0; -static RegisterPass -X("deadargelim", "Dead Argument Elimination"); +INITIALIZE_PASS(DAE, "deadargelim", "Dead Argument Elimination", false, false); namespace { /// DAH - DeadArgumentHacking pass - Same as dead argument elimination, but @@ -167,8 +166,9 @@ namespace { } char DAH::ID = 0; -static RegisterPass -Y("deadarghaX0r", "Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)"); +INITIALIZE_PASS(DAH, "deadarghaX0r", + "Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)", + false, false); /// createDeadArgEliminationPass - This pass removes arguments from functions /// which are not used by the body of the function. diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp index 662fbb5cd41..5ff80f72cf4 100644 --- a/lib/Transforms/IPO/DeadTypeElimination.cpp +++ b/lib/Transforms/IPO/DeadTypeElimination.cpp @@ -45,7 +45,7 @@ namespace { } char DTE::ID = 0; -static RegisterPass X("deadtypeelim", "Dead Type Elimination"); +INITIALIZE_PASS(DTE, "deadtypeelim", "Dead Type Elimination", false, false); ModulePass *llvm::createDeadTypeEliminationPass() { return new DTE(); diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp index 9bd7af61c53..030fe6e219a 100644 --- a/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/lib/Transforms/IPO/FunctionAttrs.cpp @@ -69,8 +69,8 @@ namespace { } char FunctionAttrs::ID = 0; -static RegisterPass -X("functionattrs", "Deduce function attributes"); +INITIALIZE_PASS(FunctionAttrs, "functionattrs", + "Deduce function attributes", false, false); Pass *llvm::createFunctionAttrsPass() { return new FunctionAttrs(); } diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp index 44216a6df99..129cb7c46e0 100644 --- a/lib/Transforms/IPO/GlobalDCE.cpp +++ b/lib/Transforms/IPO/GlobalDCE.cpp @@ -51,7 +51,8 @@ namespace { } char GlobalDCE::ID = 0; -static RegisterPass X("globaldce", "Dead Global Elimination"); +INITIALIZE_PASS(GlobalDCE, "globaldce", + "Dead Global Elimination", false, false); ModulePass *llvm::createGlobalDCEPass() { return new GlobalDCE(); } diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 1fb9e649653..3dbed864ffa 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -74,7 +74,8 @@ namespace { } char GlobalOpt::ID = 0; -static RegisterPass X("globalopt", "Global Variable Optimizer"); +INITIALIZE_PASS(GlobalOpt, "globalopt", + "Global Variable Optimizer", false, false); ModulePass *llvm::createGlobalOptimizerPass() { return new GlobalOpt(); } diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp index e4db235b1d1..03cc542fee0 100644 --- a/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/lib/Transforms/IPO/IPConstantPropagation.cpp @@ -45,8 +45,8 @@ namespace { } char IPCP::ID = 0; -static RegisterPass -X("ipconstprop", "Interprocedural constant propagation"); +INITIALIZE_PASS(IPCP, "ipconstprop", + "Interprocedural constant propagation", false, false); ModulePass *llvm::createIPConstantPropagationPass() { return new IPCP(); } diff --git a/lib/Transforms/IPO/InlineAlways.cpp b/lib/Transforms/IPO/InlineAlways.cpp index 8e312e7d918..43b50fcb3d5 100644 --- a/lib/Transforms/IPO/InlineAlways.cpp +++ b/lib/Transforms/IPO/InlineAlways.cpp @@ -61,8 +61,8 @@ namespace { } char AlwaysInliner::ID = 0; -static RegisterPass -X("always-inline", "Inliner for always_inline functions"); +INITIALIZE_PASS(AlwaysInliner, "always-inline", + "Inliner for always_inline functions", false, false); Pass *llvm::createAlwaysInlinerPass() { return new AlwaysInliner(); } diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp index 74b4a1c10ec..e609fb6867f 100644 --- a/lib/Transforms/IPO/InlineSimple.cpp +++ b/lib/Transforms/IPO/InlineSimple.cpp @@ -56,8 +56,8 @@ namespace { } char SimpleInliner::ID = 0; -static RegisterPass -X("inline", "Function Integration/Inlining"); +INITIALIZE_PASS(SimpleInliner, "inline", + "Function Integration/Inlining", false, false); Pass *llvm::createFunctionInliningPass() { return new SimpleInliner(); } diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp index 47abb7dfd81..1f861e02e2d 100644 --- a/lib/Transforms/IPO/Internalize.cpp +++ b/lib/Transforms/IPO/Internalize.cpp @@ -63,8 +63,8 @@ namespace { } // end anonymous namespace char InternalizePass::ID = 0; -static RegisterPass -X("internalize", "Internalize Global Symbols"); +INITIALIZE_PASS(InternalizePass, "internalize", + "Internalize Global Symbols", false, false); InternalizePass::InternalizePass(bool AllButMain) : ModulePass(&ID), AllButMain(AllButMain){ diff --git a/lib/Transforms/IPO/LoopExtractor.cpp b/lib/Transforms/IPO/LoopExtractor.cpp index cb813303fac..fa8eb5e9fb2 100644 --- a/lib/Transforms/IPO/LoopExtractor.cpp +++ b/lib/Transforms/IPO/LoopExtractor.cpp @@ -50,8 +50,8 @@ namespace { } char LoopExtractor::ID = 0; -static RegisterPass -X("loop-extract", "Extract loops into new functions"); +INITIALIZE_PASS(LoopExtractor, "loop-extract", + "Extract loops into new functions", false, false); namespace { /// SingleLoopExtractor - For bugpoint. @@ -62,8 +62,8 @@ namespace { } // End anonymous namespace char SingleLoopExtractor::ID = 0; -static RegisterPass -Y("loop-extract-single", "Extract at most one loop into a new function"); +INITIALIZE_PASS(SingleLoopExtractor, "loop-extract-single", + "Extract at most one loop into a new function", false, false); // createLoopExtractorPass - This pass extracts all natural loops from the // program into a function if it can. @@ -159,8 +159,9 @@ namespace { } char BlockExtractorPass::ID = 0; -static RegisterPass -XX("extract-blocks", "Extract Basic Blocks From Module (for bugpoint use)"); +INITIALIZE_PASS(BlockExtractorPass, "extract-blocks", + "Extract Basic Blocks From Module (for bugpoint use)", + false, false); // createBlockExtractorPass - This pass extracts all blocks (except those // specified in the argument list) from the functions in the module. diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp index 76cfef8335c..fa19ea1fa46 100644 --- a/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/lib/Transforms/IPO/LowerSetJmp.cpp @@ -122,7 +122,7 @@ namespace { } // end anonymous namespace char LowerSetJmp::ID = 0; -static RegisterPass X("lowersetjmp", "Lower Set Jump"); +INITIALIZE_PASS(LowerSetJmp, "lowersetjmp", "Lower Set Jump", false, false); // run - Run the transformation on the program. We grab the function // prototypes for longjmp and setjmp. If they are used in the program, diff --git a/lib/Transforms/IPO/MergeFunctions.cpp b/lib/Transforms/IPO/MergeFunctions.cpp index 87b10f2e878..3b28d27820f 100644 --- a/lib/Transforms/IPO/MergeFunctions.cpp +++ b/lib/Transforms/IPO/MergeFunctions.cpp @@ -111,7 +111,7 @@ namespace { } char MergeFunctions::ID = 0; -static RegisterPass X("mergefunc", "Merge Functions"); +INITIALIZE_PASS(MergeFunctions, "mergefunc", "Merge Functions", false, false); ModulePass *llvm::createMergeFunctionsPass() { return new MergeFunctions(); diff --git a/lib/Transforms/IPO/PartialInlining.cpp b/lib/Transforms/IPO/PartialInlining.cpp index 6b9814ceb87..d3c4a50bc0a 100644 --- a/lib/Transforms/IPO/PartialInlining.cpp +++ b/lib/Transforms/IPO/PartialInlining.cpp @@ -40,7 +40,8 @@ namespace { } char PartialInliner::ID = 0; -static RegisterPass X("partial-inliner", "Partial Inliner"); +INITIALIZE_PASS(PartialInliner, "partial-inliner", + "Partial Inliner", false, false); ModulePass* llvm::createPartialInliningPass() { return new PartialInliner(); } diff --git a/lib/Transforms/IPO/PartialSpecialization.cpp b/lib/Transforms/IPO/PartialSpecialization.cpp index 58e14481b0e..e7c2cfcd0d1 100644 --- a/lib/Transforms/IPO/PartialSpecialization.cpp +++ b/lib/Transforms/IPO/PartialSpecialization.cpp @@ -56,8 +56,8 @@ namespace { } char PartSpec::ID = 0; -static RegisterPass -X("partialspecialization", "Partial Specialization"); +INITIALIZE_PASS(PartSpec, "partialspecialization", + "Partial Specialization", false, false); // Specialize F by replacing the arguments (keys) in replacements with the // constants (values). Replace all calls to F with those constants with diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index de6099cc1da..7d2968e024b 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -48,8 +48,8 @@ namespace { } char PruneEH::ID = 0; -static RegisterPass -X("prune-eh", "Remove unused exception handling info"); +INITIALIZE_PASS(PruneEH, "prune-eh", + "Remove unused exception handling info", false, false); Pass *llvm::createPruneEHPass() { return new PruneEH(); } diff --git a/lib/Transforms/IPO/StripDeadPrototypes.cpp b/lib/Transforms/IPO/StripDeadPrototypes.cpp index 4566a7634af..32722f1e1e8 100644 --- a/lib/Transforms/IPO/StripDeadPrototypes.cpp +++ b/lib/Transforms/IPO/StripDeadPrototypes.cpp @@ -36,8 +36,8 @@ public: } // end anonymous namespace char StripDeadPrototypesPass::ID = 0; -static RegisterPass -X("strip-dead-prototypes", "Strip Unused Function Prototypes"); +INITIALIZE_PASS(StripDeadPrototypesPass, "strip-dead-prototypes", + "Strip Unused Function Prototypes", false, false); bool StripDeadPrototypesPass::runOnModule(Module &M) { bool MadeChange = false; diff --git a/lib/Transforms/IPO/StripSymbols.cpp b/lib/Transforms/IPO/StripSymbols.cpp index 3bcaee3437f..55674614bce 100644 --- a/lib/Transforms/IPO/StripSymbols.cpp +++ b/lib/Transforms/IPO/StripSymbols.cpp @@ -89,32 +89,33 @@ namespace { } char StripSymbols::ID = 0; -static RegisterPass -X("strip", "Strip all symbols from a module"); +INITIALIZE_PASS(StripSymbols, "strip", + "Strip all symbols from a module", false, false); ModulePass *llvm::createStripSymbolsPass(bool OnlyDebugInfo) { return new StripSymbols(OnlyDebugInfo); } char StripNonDebugSymbols::ID = 0; -static RegisterPass -Y("strip-nondebug", "Strip all symbols, except dbg symbols, from a module"); +INITIALIZE_PASS(StripNonDebugSymbols, "strip-nondebug", + "Strip all symbols, except dbg symbols, from a module", + false, false); ModulePass *llvm::createStripNonDebugSymbolsPass() { return new StripNonDebugSymbols(); } char StripDebugDeclare::ID = 0; -static RegisterPass -Z("strip-debug-declare", "Strip all llvm.dbg.declare intrinsics"); +INITIALIZE_PASS(StripDebugDeclare, "strip-debug-declare", + "Strip all llvm.dbg.declare intrinsics", false, false); ModulePass *llvm::createStripDebugDeclarePass() { return new StripDebugDeclare(); } char StripDeadDebugInfo::ID = 0; -static RegisterPass -A("strip-dead-debug-info", "Strip debug info for unused symbols"); +INITIALIZE_PASS(StripDeadDebugInfo, "strip-dead-debug-info", + "Strip debug info for unused symbols", false, false); ModulePass *llvm::createStripDeadDebugInfoPass() { return new StripDeadDebugInfo(); diff --git a/lib/Transforms/IPO/StructRetPromotion.cpp b/lib/Transforms/IPO/StructRetPromotion.cpp index a74686f408b..6857ef52460 100644 --- a/lib/Transforms/IPO/StructRetPromotion.cpp +++ b/lib/Transforms/IPO/StructRetPromotion.cpp @@ -62,8 +62,8 @@ namespace { } char SRETPromotion::ID = 0; -static RegisterPass -X("sretpromotion", "Promote sret arguments to multiple ret values"); +INITIALIZE_PASS(SRETPromotion, "sretpromotion", + "Promote sret arguments to multiple ret values", false, false); Pass *llvm::createStructRetPromotionPass() { return new SRETPromotion(); diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp index af2958fe3d9..e46c67994e2 100644 --- a/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -60,8 +60,8 @@ STATISTIC(NumSunkInst , "Number of instructions sunk"); char InstCombiner::ID = 0; -static RegisterPass -X("instcombine", "Combine redundant instructions"); +INITIALIZE_PASS(InstCombiner, "instcombine", + "Combine redundant instructions", false, false); void InstCombiner::getAnalysisUsage(AnalysisUsage &AU) const { AU.addPreservedID(LCSSAID); diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp index 9ae37867071..e5cd1f0ef42 100644 --- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp +++ b/lib/Transforms/Instrumentation/EdgeProfiling.cpp @@ -43,8 +43,8 @@ namespace { } char EdgeProfiler::ID = 0; -static RegisterPass -X("insert-edge-profiling", "Insert instrumentation for edge profiling"); +INITIALIZE_PASS(EdgeProfiler, "insert-edge-profiling", + "Insert instrumentation for edge profiling", false, false); ModulePass *llvm::createEdgeProfilerPass() { return new EdgeProfiler(); } diff --git a/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp b/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp index 41e3a39f268..a6de60d2935 100644 --- a/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp +++ b/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp @@ -50,9 +50,9 @@ namespace { } char OptimalEdgeProfiler::ID = 0; -static RegisterPass -X("insert-optimal-edge-profiling", - "Insert optimal instrumentation for edge profiling"); +INITIALIZE_PASS(OptimalEdgeProfiler, "insert-optimal-edge-profiling", + "Insert optimal instrumentation for edge profiling", + false, false); ModulePass *llvm::createOptimalEdgeProfilerPass() { return new OptimalEdgeProfiler(); diff --git a/lib/Transforms/Scalar/ABCD.cpp b/lib/Transforms/Scalar/ABCD.cpp index dcf14a6860d..20f90839c97 100644 --- a/lib/Transforms/Scalar/ABCD.cpp +++ b/lib/Transforms/Scalar/ABCD.cpp @@ -441,8 +441,9 @@ class ABCD : public FunctionPass { } // end anonymous namespace. char ABCD::ID = 0; -static RegisterPass X("abcd", "ABCD: Eliminating Array Bounds Checks on Demand"); - +INITIALIZE_PASS(ABCD, "abcd", + "ABCD: Eliminating Array Bounds Checks on Demand", + false, false); bool ABCD::runOnFunction(Function &F) { modified = false; diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index 2d19467ce74..4df1c7c8b8a 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -45,7 +45,7 @@ namespace { } char ADCE::ID = 0; -static RegisterPass X("adce", "Aggressive Dead Code Elimination"); +INITIALIZE_PASS(ADCE, "adce", "Aggressive Dead Code Elimination", false, false); bool ADCE::runOnFunction(Function& F) { SmallPtrSet alive; diff --git a/lib/Transforms/Scalar/BasicBlockPlacement.cpp b/lib/Transforms/Scalar/BasicBlockPlacement.cpp index 54533f50405..89fb64c58bf 100644 --- a/lib/Transforms/Scalar/BasicBlockPlacement.cpp +++ b/lib/Transforms/Scalar/BasicBlockPlacement.cpp @@ -74,8 +74,8 @@ namespace { } char BlockPlacement::ID = 0; -static RegisterPass -X("block-placement", "Profile Guided Basic Block Placement"); +INITIALIZE_PASS(BlockPlacement, "block-placement", + "Profile Guided Basic Block Placement", false, false); FunctionPass *llvm::createBlockPlacementPass() { return new BlockPlacement(); } diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index 960ef1e6b2e..0c14b521cad 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -82,8 +82,8 @@ namespace { } char CodeGenPrepare::ID = 0; -static RegisterPass X("codegenprepare", - "Optimize for code generation"); +INITIALIZE_PASS(CodeGenPrepare, "codegenprepare", + "Optimize for code generation", false, false); FunctionPass *llvm::createCodeGenPreparePass(const TargetLowering *TLI) { return new CodeGenPrepare(TLI); diff --git a/lib/Transforms/Scalar/ConstantProp.cpp b/lib/Transforms/Scalar/ConstantProp.cpp index ea208135739..0e9d68cbe66 100644 --- a/lib/Transforms/Scalar/ConstantProp.cpp +++ b/lib/Transforms/Scalar/ConstantProp.cpp @@ -45,8 +45,8 @@ namespace { } char ConstantPropagation::ID = 0; -static RegisterPass -X("constprop", "Simple constant propagation"); +INITIALIZE_PASS(ConstantPropagation, "constprop", + "Simple constant propagation", false, false); FunctionPass *llvm::createConstantPropagationPass() { return new ConstantPropagation(); diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index 39940c35da5..6baeceb5ee2 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -56,8 +56,8 @@ namespace { } char DeadInstElimination::ID = 0; -static RegisterPass -X("die", "Dead Instruction Elimination"); +INITIALIZE_PASS(DeadInstElimination, "die", + "Dead Instruction Elimination", false, false); Pass *llvm::createDeadInstEliminationPass() { return new DeadInstElimination(); @@ -81,7 +81,7 @@ namespace { } char DCE::ID = 0; -static RegisterPass Y("dce", "Dead Code Elimination"); +INITIALIZE_PASS(DCE, "dce", "Dead Code Elimination", false, false); bool DCE::runOnFunction(Function &F) { // Start out with all of the instructions in the worklist... diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index e047e4ffa15..dddefeda083 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -82,7 +82,7 @@ namespace { } char DSE::ID = 0; -static RegisterPass X("dse", "Dead Store Elimination"); +INITIALIZE_PASS(DSE, "dse", "Dead Store Elimination", false, false); FunctionPass *llvm::createDeadStoreEliminationPass() { return new DSE(); } diff --git a/lib/Transforms/Scalar/GEPSplitter.cpp b/lib/Transforms/Scalar/GEPSplitter.cpp index 610a41dae44..5894f8ff443 100644 --- a/lib/Transforms/Scalar/GEPSplitter.cpp +++ b/lib/Transforms/Scalar/GEPSplitter.cpp @@ -32,8 +32,8 @@ namespace { } char GEPSplitter::ID = 0; -static RegisterPass X("split-geps", - "split complex GEPs into simple GEPs"); +INITIALIZE_PASS(GEPSplitter, "split-geps", + "split complex GEPs into simple GEPs", false, false); FunctionPass *llvm::createGEPSplitterPass() { return new GEPSplitter(); diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index 88b67768fa5..d7e1115a4f4 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -716,8 +716,7 @@ FunctionPass *llvm::createGVNPass(bool NoLoads) { return new GVN(NoLoads); } -static RegisterPass X("gvn", - "Global Value Numbering"); +INITIALIZE_PASS(GVN, "gvn", "Global Value Numbering", false, false); void GVN::dump(DenseMap& d) { errs() << "{\n"; diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 03fb40d5b62..b8fd084c2d6 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -117,8 +117,8 @@ namespace { } char IndVarSimplify::ID = 0; -static RegisterPass -X("indvars", "Canonicalize Induction Variables"); +INITIALIZE_PASS(IndVarSimplify, "indvars", + "Canonicalize Induction Variables", false, false); Pass *llvm::createIndVarSimplifyPass() { return new IndVarSimplify(); diff --git a/lib/Transforms/Scalar/JumpThreading.cpp b/lib/Transforms/Scalar/JumpThreading.cpp index edce14cd92e..b07b5d90898 100644 --- a/lib/Transforms/Scalar/JumpThreading.cpp +++ b/lib/Transforms/Scalar/JumpThreading.cpp @@ -111,8 +111,8 @@ namespace { } char JumpThreading::ID = 0; -static RegisterPass -X("jump-threading", "Jump Threading"); +INITIALIZE_PASS(JumpThreading, "jump-threading", + "Jump Threading", false, false); // Public interface to the Jump Threading pass FunctionPass *llvm::createJumpThreadingPass() { return new JumpThreading(); } diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index b964d7037ab..0f206698d5d 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -222,7 +222,7 @@ namespace { } char LICM::ID = 0; -static RegisterPass X("licm", "Loop Invariant Code Motion"); +INITIALIZE_PASS(LICM, "licm", "Loop Invariant Code Motion", false, false); Pass *llvm::createLICMPass() { return new LICM(); } diff --git a/lib/Transforms/Scalar/LoopDeletion.cpp b/lib/Transforms/Scalar/LoopDeletion.cpp index e4894e99b68..354b033db78 100644 --- a/lib/Transforms/Scalar/LoopDeletion.cpp +++ b/lib/Transforms/Scalar/LoopDeletion.cpp @@ -55,7 +55,8 @@ namespace { } char LoopDeletion::ID = 0; -static RegisterPass X("loop-deletion", "Delete dead loops"); +INITIALIZE_PASS(LoopDeletion, "loop-deletion", + "Delete dead loops", false, false); Pass* llvm::createLoopDeletionPass() { return new LoopDeletion(); diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp index 31058e5759a..c3a387071d4 100644 --- a/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/lib/Transforms/Scalar/LoopIndexSplit.cpp @@ -197,8 +197,8 @@ namespace { } char LoopIndexSplit::ID = 0; -static RegisterPass -X("loop-index-split", "Index Split Loops"); +INITIALIZE_PASS(LoopIndexSplit, "loop-index-split", + "Index Split Loops", false, false); Pass *llvm::createLoopIndexSplitPass() { return new LoopIndexSplit(); diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp index 313437789a8..6fecbb3a280 100644 --- a/lib/Transforms/Scalar/LoopRotation.cpp +++ b/lib/Transforms/Scalar/LoopRotation.cpp @@ -79,7 +79,7 @@ namespace { } char LoopRotate::ID = 0; -static RegisterPass X("loop-rotate", "Rotate Loops"); +INITIALIZE_PASS(LoopRotate, "loop-rotate", "Rotate Loops", false, false); Pass *llvm::createLoopRotatePass() { return new LoopRotate(); } diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index adaadb26e9b..5a1efbe2c2e 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -3743,8 +3743,8 @@ private: } char LoopStrengthReduce::ID = 0; -static RegisterPass -X("loop-reduce", "Loop Strength Reduction"); +INITIALIZE_PASS(LoopStrengthReduce, "loop-reduce", + "Loop Strength Reduction", false, false); Pass *llvm::createLoopStrengthReducePass(const TargetLowering *TLI) { return new LoopStrengthReduce(TLI); diff --git a/lib/Transforms/Scalar/LoopUnrollPass.cpp b/lib/Transforms/Scalar/LoopUnrollPass.cpp index 4ad41ae4b59..1b4583d0b35 100644 --- a/lib/Transforms/Scalar/LoopUnrollPass.cpp +++ b/lib/Transforms/Scalar/LoopUnrollPass.cpp @@ -71,7 +71,7 @@ namespace { } char LoopUnroll::ID = 0; -static RegisterPass X("loop-unroll", "Unroll loops"); +INITIALIZE_PASS(LoopUnroll, "loop-unroll", "Unroll loops", false, false); Pass *llvm::createLoopUnrollPass() { return new LoopUnroll(); } diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 0c900ffc402..f30d1e850ee 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -160,7 +160,7 @@ namespace { }; } char LoopUnswitch::ID = 0; -static RegisterPass X("loop-unswitch", "Unswitch loops"); +INITIALIZE_PASS(LoopUnswitch, "loop-unswitch", "Unswitch loops", false, false); Pass *llvm::createLoopUnswitchPass(bool Os) { return new LoopUnswitch(Os); diff --git a/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/lib/Transforms/Scalar/MemCpyOptimizer.cpp index 0e566c5bd9b..7ed85889a05 100644 --- a/lib/Transforms/Scalar/MemCpyOptimizer.cpp +++ b/lib/Transforms/Scalar/MemCpyOptimizer.cpp @@ -331,8 +331,7 @@ namespace { // createMemCpyOptPass - The public interface to this file... FunctionPass *llvm::createMemCpyOptPass() { return new MemCpyOpt(); } -static RegisterPass X("memcpyopt", - "MemCpy Optimization"); +INITIALIZE_PASS(MemCpyOpt, "memcpyopt", "MemCpy Optimization", false, false); diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp index 98452f5d82c..e686c52fd8a 100644 --- a/lib/Transforms/Scalar/Reassociate.cpp +++ b/lib/Transforms/Scalar/Reassociate.cpp @@ -103,7 +103,8 @@ namespace { } char Reassociate::ID = 0; -static RegisterPass X("reassociate", "Reassociate expressions"); +INITIALIZE_PASS(Reassociate, "reassociate", + "Reassociate expressions", false, false); // Public interface to the Reassociate pass FunctionPass *llvm::createReassociatePass() { return new Reassociate(); } diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 907ece8fcce..dcb657cc1f1 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -1600,8 +1600,8 @@ namespace { } // end anonymous namespace char SCCP::ID = 0; -static RegisterPass -X("sccp", "Sparse Conditional Constant Propagation"); +INITIALIZE_PASS(SCCP, "sccp", + "Sparse Conditional Constant Propagation", false, false); // createSCCPPass - This is the public interface to this file. FunctionPass *llvm::createSCCPPass() { @@ -1708,8 +1708,9 @@ namespace { } // end anonymous namespace char IPSCCP::ID = 0; -static RegisterPass -Y("ipsccp", "Interprocedural Sparse Conditional Constant Propagation"); +INITIALIZE_PASS(IPSCCP, "ipsccp", + "Interprocedural Sparse Conditional Constant Propagation", + false, false); // createIPSCCPPass - This is the public interface to this file. ModulePass *llvm::createIPSCCPPass() { diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index 8fb2e582e1e..fa0a6972025 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -135,7 +135,8 @@ namespace { } char SROA::ID = 0; -static RegisterPass X("scalarrepl", "Scalar Replacement of Aggregates"); +INITIALIZE_PASS(SROA, "scalarrepl", + "Scalar Replacement of Aggregates", false, false); // Public interface to the ScalarReplAggregates pass FunctionPass *llvm::createScalarReplAggregatesPass(signed int Threshold) { diff --git a/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/lib/Transforms/Scalar/SimplifyCFGPass.cpp index 49d93a2fcc2..dad8f2aaec0 100644 --- a/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/lib/Transforms/Scalar/SimplifyCFGPass.cpp @@ -49,7 +49,8 @@ namespace { } char CFGSimplifyPass::ID = 0; -static RegisterPass X("simplifycfg", "Simplify the CFG"); +INITIALIZE_PASS(CFGSimplifyPass, "simplifycfg", + "Simplify the CFG", false, false); // Public interface to the CFGSimplification pass FunctionPass *llvm::createCFGSimplificationPass() { diff --git a/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp b/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp index c3408e77807..f8828842e0d 100644 --- a/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp +++ b/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp @@ -46,8 +46,8 @@ namespace { char SimplifyHalfPowrLibCalls::ID = 0; } // end anonymous namespace. -static RegisterPass -X("simplify-libcalls-halfpowr", "Simplify half_powr library calls"); +INITIALIZE_PASS(SimplifyHalfPowrLibCalls, "simplify-libcalls-halfpowr", + "Simplify half_powr library calls", false, false); // Public interface to the Simplify HalfPowr LibCalls pass. FunctionPass *llvm::createSimplifyHalfPowrLibCallsPass() { diff --git a/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/lib/Transforms/Scalar/SimplifyLibCalls.cpp index b1c619125c3..8a0f6c0c182 100644 --- a/lib/Transforms/Scalar/SimplifyLibCalls.cpp +++ b/lib/Transforms/Scalar/SimplifyLibCalls.cpp @@ -1253,8 +1253,8 @@ namespace { char SimplifyLibCalls::ID = 0; } // end anonymous namespace. -static RegisterPass -X("simplify-libcalls", "Simplify well-known library calls"); +INITIALIZE_PASS(SimplifyLibCalls, "simplify-libcalls", + "Simplify well-known library calls", false, false); // Public interface to the Simplify LibCalls pass. FunctionPass *llvm::createSimplifyLibCallsPass() { diff --git a/lib/Transforms/Scalar/Sink.cpp b/lib/Transforms/Scalar/Sink.cpp index b88ba485050..2448312673b 100644 --- a/lib/Transforms/Scalar/Sink.cpp +++ b/lib/Transforms/Scalar/Sink.cpp @@ -56,8 +56,7 @@ namespace { } // end anonymous namespace char Sinking::ID = 0; -static RegisterPass -X("sink", "Code sinking"); +INITIALIZE_PASS(Sinking, "sink", "Code sinking", false, false); FunctionPass *llvm::createSinkingPass() { return new Sinking(); } diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp index 9208238f4ba..006ce90b376 100644 --- a/lib/Transforms/Scalar/TailDuplication.cpp +++ b/lib/Transforms/Scalar/TailDuplication.cpp @@ -59,7 +59,7 @@ namespace { } char TailDup::ID = 0; -static RegisterPass X("tailduplicate", "Tail Duplication"); +INITIALIZE_PASS(TailDup, "tailduplicate", "Tail Duplication", false, false); // Public interface to the Tail Duplication pass FunctionPass *llvm::createTailDuplicationPass() { return new TailDup(); } diff --git a/lib/Transforms/Scalar/TailRecursionElimination.cpp b/lib/Transforms/Scalar/TailRecursionElimination.cpp index 01c8e5d6fcf..5b105e4c0c2 100644 --- a/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -87,7 +87,8 @@ namespace { } char TailCallElim::ID = 0; -static RegisterPass X("tailcallelim", "Tail Call Elimination"); +INITIALIZE_PASS(TailCallElim, "tailcallelim", + "Tail Call Elimination", false, false); // Public interface to the TailCallElimination pass FunctionPass *llvm::createTailCallEliminationPass() { diff --git a/lib/Transforms/Utils/SSI.cpp b/lib/Transforms/Utils/SSI.cpp index 4e813ddf95c..d54a0e5a751 100644 --- a/lib/Transforms/Utils/SSI.cpp +++ b/lib/Transforms/Utils/SSI.cpp @@ -391,7 +391,8 @@ void SSI::clean() { FunctionPass *llvm::createSSIPass() { return new SSI(); } char SSI::ID = 0; -static RegisterPass X("ssi", "Static Single Information Construction"); +INITIALIZE_PASS(SSI, "ssi", + "Static Single Information Construction", false, false); /// SSIEverything - A pass that runs createSSI on every non-void variable, /// intended for debugging. @@ -428,5 +429,5 @@ bool SSIEverything::runOnFunction(Function &F) { FunctionPass *llvm::createSSIEverythingPass() { return new SSIEverything(); } char SSIEverything::ID = 0; -static RegisterPass -Y("ssi-everything", "Static Single Information Construction"); +INITIALIZE_PASS(SSIEverything, "ssi-everything", + "Static Single Information Construction", false, false); diff --git a/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp b/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp index 3fa8b70a850..3d64d532d9d 100644 --- a/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp +++ b/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp @@ -24,8 +24,8 @@ using namespace llvm; char UnifyFunctionExitNodes::ID = 0; -static RegisterPass -X("mergereturn", "Unify function exit nodes"); +INITIALIZE_PASS(UnifyFunctionExitNodes, "mergereturn", + "Unify function exit nodes", false, false); Pass *llvm::createUnifyFunctionExitNodesPass() { return new UnifyFunctionExitNodes(); diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp index 58ce05c3bfb..4a6c5e80250 100644 --- a/lib/VMCore/Dominators.cpp +++ b/lib/VMCore/Dominators.cpp @@ -52,8 +52,8 @@ TEMPLATE_INSTANTIATION(class llvm::DomTreeNodeBase); TEMPLATE_INSTANTIATION(class llvm::DominatorTreeBase); char DominatorTree::ID = 0; -static RegisterPass -E("domtree", "Dominator Tree Construction", true, true); +INITIALIZE_PASS(DominatorTree, "domtree", + "Dominator Tree Construction", true, true); bool DominatorTree::runOnFunction(Function &F) { DT->recalculate(F); @@ -106,8 +106,8 @@ bool DominatorTree::dominates(const Instruction *A, const Instruction *B) const{ //===----------------------------------------------------------------------===// char DominanceFrontier::ID = 0; -static RegisterPass -G("domfrontier", "Dominance Frontier Construction", true, true); +INITIALIZE_PASS(DominanceFrontier, "domfrontier", + "Dominance Frontier Construction", true, true); void DominanceFrontier::verifyAnalysis() const { if (!VerifyDomInfo) return; diff --git a/lib/VMCore/PrintModulePass.cpp b/lib/VMCore/PrintModulePass.cpp index 2d69dce07f3..7baacf71ceb 100644 --- a/lib/VMCore/PrintModulePass.cpp +++ b/lib/VMCore/PrintModulePass.cpp @@ -77,11 +77,11 @@ namespace { } char PrintModulePass::ID = 0; -static RegisterPass -X("print-module", "Print module to stderr"); +INITIALIZE_PASS(PrintModulePass, "print-module", + "Print module to stderr", false, false); char PrintFunctionPass::ID = 0; -static RegisterPass -Y("print-function","Print function to stderr"); +INITIALIZE_PASS(PrintFunctionPass, "print-function", + "Print function to stderr", false, false); /// createPrintModulePass - Create and return a pass that writes the /// module to the specified raw_ostream. -- 2.34.1