diff options
Diffstat (limited to 'lib/Transforms/Scalar')
28 files changed, 51 insertions, 47 deletions
diff --git a/lib/Transforms/Scalar/ABCD.cpp b/lib/Transforms/Scalar/ABCD.cpp index dcf14a6..20f9083 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<ABCD> 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 2d19467..4df1c7c 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -45,7 +45,7 @@ namespace { } char ADCE::ID = 0; -static RegisterPass<ADCE> X("adce", "Aggressive Dead Code Elimination"); +INITIALIZE_PASS(ADCE, "adce", "Aggressive Dead Code Elimination", false, false); bool ADCE::runOnFunction(Function& F) { SmallPtrSet<Instruction*, 128> alive; diff --git a/lib/Transforms/Scalar/BasicBlockPlacement.cpp b/lib/Transforms/Scalar/BasicBlockPlacement.cpp index 54533f5..89fb64c 100644 --- a/lib/Transforms/Scalar/BasicBlockPlacement.cpp +++ b/lib/Transforms/Scalar/BasicBlockPlacement.cpp @@ -74,8 +74,8 @@ namespace { } char BlockPlacement::ID = 0; -static RegisterPass<BlockPlacement> -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 960ef1e..0c14b52 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -82,8 +82,8 @@ namespace { } char CodeGenPrepare::ID = 0; -static RegisterPass<CodeGenPrepare> 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 ea20813..0e9d68c 100644 --- a/lib/Transforms/Scalar/ConstantProp.cpp +++ b/lib/Transforms/Scalar/ConstantProp.cpp @@ -45,8 +45,8 @@ namespace { } char ConstantPropagation::ID = 0; -static RegisterPass<ConstantPropagation> -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 39940c3..6baeceb 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -56,8 +56,8 @@ namespace { } char DeadInstElimination::ID = 0; -static RegisterPass<DeadInstElimination> -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<DCE> 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 e047e4f..dddefed 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -82,7 +82,7 @@ namespace { } char DSE::ID = 0; -static RegisterPass<DSE> 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 610a41d..5894f8f 100644 --- a/lib/Transforms/Scalar/GEPSplitter.cpp +++ b/lib/Transforms/Scalar/GEPSplitter.cpp @@ -32,8 +32,8 @@ namespace { } char GEPSplitter::ID = 0; -static RegisterPass<GEPSplitter> 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 88b6776..d7e1115 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<GVN> X("gvn", - "Global Value Numbering"); +INITIALIZE_PASS(GVN, "gvn", "Global Value Numbering", false, false); void GVN::dump(DenseMap<uint32_t, Value*>& d) { errs() << "{\n"; diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 03fb40d..b8fd084 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -117,8 +117,8 @@ namespace { } char IndVarSimplify::ID = 0; -static RegisterPass<IndVarSimplify> -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 edce14c..b07b5d9 100644 --- a/lib/Transforms/Scalar/JumpThreading.cpp +++ b/lib/Transforms/Scalar/JumpThreading.cpp @@ -111,8 +111,8 @@ namespace { } char JumpThreading::ID = 0; -static RegisterPass<JumpThreading> -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 b964d70..0f20669 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -222,7 +222,7 @@ namespace { } char LICM::ID = 0; -static RegisterPass<LICM> 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 e4894e9..354b033 100644 --- a/lib/Transforms/Scalar/LoopDeletion.cpp +++ b/lib/Transforms/Scalar/LoopDeletion.cpp @@ -55,7 +55,8 @@ namespace { } char LoopDeletion::ID = 0; -static RegisterPass<LoopDeletion> 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 31058e5..c3a3870 100644 --- a/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/lib/Transforms/Scalar/LoopIndexSplit.cpp @@ -197,8 +197,8 @@ namespace { } char LoopIndexSplit::ID = 0; -static RegisterPass<LoopIndexSplit> -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 3134377..6fecbb3 100644 --- a/lib/Transforms/Scalar/LoopRotation.cpp +++ b/lib/Transforms/Scalar/LoopRotation.cpp @@ -79,7 +79,7 @@ namespace { } char LoopRotate::ID = 0; -static RegisterPass<LoopRotate> 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 adaadb2..5a1efbe 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -3743,8 +3743,8 @@ private: } char LoopStrengthReduce::ID = 0; -static RegisterPass<LoopStrengthReduce> -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 4ad41ae..1b4583d 100644 --- a/lib/Transforms/Scalar/LoopUnrollPass.cpp +++ b/lib/Transforms/Scalar/LoopUnrollPass.cpp @@ -71,7 +71,7 @@ namespace { } char LoopUnroll::ID = 0; -static RegisterPass<LoopUnroll> 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 0c900ff..f30d1e8 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -160,7 +160,7 @@ namespace { }; } char LoopUnswitch::ID = 0; -static RegisterPass<LoopUnswitch> 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 0e566c5..7ed8588 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<MemCpyOpt> 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 98452f5..e686c52 100644 --- a/lib/Transforms/Scalar/Reassociate.cpp +++ b/lib/Transforms/Scalar/Reassociate.cpp @@ -103,7 +103,8 @@ namespace { } char Reassociate::ID = 0; -static RegisterPass<Reassociate> 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 907ece8..dcb657c 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<SCCP> -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<IPSCCP> -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 8fb2e58..fa0a697 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -135,7 +135,8 @@ namespace { } char SROA::ID = 0; -static RegisterPass<SROA> 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 49d93a2..dad8f2a 100644 --- a/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/lib/Transforms/Scalar/SimplifyCFGPass.cpp @@ -49,7 +49,8 @@ namespace { } char CFGSimplifyPass::ID = 0; -static RegisterPass<CFGSimplifyPass> 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 c3408e7..f882884 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<SimplifyHalfPowrLibCalls> -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 b1c6191..8a0f6c0 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<SimplifyLibCalls> -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 b88ba48..2448312 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<Sinking> -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 9208238..006ce90 100644 --- a/lib/Transforms/Scalar/TailDuplication.cpp +++ b/lib/Transforms/Scalar/TailDuplication.cpp @@ -59,7 +59,7 @@ namespace { } char TailDup::ID = 0; -static RegisterPass<TailDup> 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 01c8e5d..5b105e4 100644 --- a/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -87,7 +87,8 @@ namespace { } char TailCallElim::ID = 0; -static RegisterPass<TailCallElim> X("tailcallelim", "Tail Call Elimination"); +INITIALIZE_PASS(TailCallElim, "tailcallelim", + "Tail Call Elimination", false, false); // Public interface to the TailCallElimination pass FunctionPass *llvm::createTailCallEliminationPass() { |