[llvm-commits] [llvm] r116334 - in /llvm/trunk: include/llvm/ lib/Analysis/ lib/Analysis/IPA/ lib/CodeGen/ lib/Transforms/IPO/ lib/Transforms/Instrumentation/ lib/Transforms/Scalar/ lib/Transforms/Utils/ lib/VMCore/
Andy Trick
atrick at apple.com
Tue Oct 12 13:23:07 PDT 2010
Pardon the newbie question. Do you need to synchronize the initializers now that the loader isn't doing it for you?
-Andy
On Oct 12, 2010, at 12:48 PM, Owen Anderson wrote:
> Author: resistor
> Date: Tue Oct 12 14:48:12 2010
> New Revision: 116334
>
> URL: http://llvm.org/viewvc/llvm-project?rev=116334&view=rev
> Log:
> Begin adding static dependence information to passes, which will allow us to
> perform initialization without static constructors AND without explicit initialization
> by the client. For the moment, passes are required to initialize both their
> (potential) dependencies and any passes they preserve. I hope to be able to relax
> the latter requirement in the future.
>
> Modified:
> llvm/trunk/include/llvm/PassSupport.h
> llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp
> llvm/trunk/lib/Analysis/AliasSetTracker.cpp
> llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp
> llvm/trunk/lib/Analysis/IVUsers.cpp
> llvm/trunk/lib/Analysis/Lint.cpp
> llvm/trunk/lib/Analysis/LiveValues.cpp
> llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp
> llvm/trunk/lib/Analysis/LoopInfo.cpp
> llvm/trunk/lib/Analysis/MemDepPrinter.cpp
> llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
> llvm/trunk/lib/Analysis/PostDominators.cpp
> llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp
> llvm/trunk/lib/Analysis/ProfileVerifierPass.cpp
> llvm/trunk/lib/Analysis/RegionInfo.cpp
> llvm/trunk/lib/Analysis/ScalarEvolution.cpp
> llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
> llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp
> llvm/trunk/lib/CodeGen/IfConversion.cpp
> llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
> llvm/trunk/lib/CodeGen/LiveVariables.cpp
> llvm/trunk/lib/CodeGen/MachineCSE.cpp
> llvm/trunk/lib/CodeGen/MachineLICM.cpp
> llvm/trunk/lib/CodeGen/MachineLoopInfo.cpp
> llvm/trunk/lib/CodeGen/MachineSink.cpp
> llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp
> llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
> llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp
> llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
> llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
> llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp
> llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
> llvm/trunk/lib/CodeGen/Splitter.cpp
> llvm/trunk/lib/CodeGen/StackSlotColoring.cpp
> llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp
> llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
> llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
> llvm/trunk/lib/Transforms/IPO/DeadTypeElimination.cpp
> llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp
> llvm/trunk/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp
> llvm/trunk/lib/Transforms/Scalar/BasicBlockPlacement.cpp
> llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
> llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
> llvm/trunk/lib/Transforms/Scalar/GVN.cpp
> llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
> llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
> llvm/trunk/lib/Transforms/Scalar/LICM.cpp
> llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp
> llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
> llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
> llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
> llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
> llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp
> llvm/trunk/lib/Transforms/Scalar/Reg2Mem.cpp
> llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp
> llvm/trunk/lib/Transforms/Scalar/Sink.cpp
> llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
> llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
> llvm/trunk/lib/Transforms/Utils/Mem2Reg.cpp
> llvm/trunk/lib/VMCore/Dominators.cpp
> llvm/trunk/lib/VMCore/Verifier.cpp
>
> Modified: llvm/trunk/include/llvm/PassSupport.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassSupport.h?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/PassSupport.h (original)
> +++ llvm/trunk/include/llvm/PassSupport.h Tue Oct 12 14:48:12 2010
> @@ -130,12 +130,32 @@
>
> #define INITIALIZE_PASS(passName, arg, name, cfg, analysis) \
> void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
> + static bool initialized = false; \
> + if (initialized) return; \
> + initialized = true; \
> + PassInfo *PI = new PassInfo(name, arg, & passName ::ID, \
> + PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
> + Registry.registerPass(*PI); \
> + } \
> + static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis);
> +
> +#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis) \
> + void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
> + static bool initialized = false; \
> + if (initialized) return; \
> + initialized = true;
> +
> +#define INITIALIZE_PASS_DEPENDENCY(depName) \
> + initialize##depName##Pass(Registry);
> +#define INITIALIZE_AG_DEPENDENCY(depName) \
> + initialize##depName##AnalysisGroup(Registry);
> +
> +#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis) \
> PassInfo *PI = new PassInfo(name, arg, & passName ::ID, \
> PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
> Registry.registerPass(*PI); \
> } \
> static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis);
> -
>
> template<typename PassName>
> Pass *callDefaultCtor() { return new PassName(); }
> @@ -220,6 +240,7 @@
>
> #define INITIALIZE_AG_PASS(passName, agName, arg, name, cfg, analysis, def) \
> void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
> + initialize##agName##AnalysisGroup(Registry); \
> PassInfo *PI = new PassInfo(name, arg, & passName ::ID, \
> PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
> Registry.registerPass(*PI); \
> @@ -230,6 +251,21 @@
> static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis); \
> static RegisterAnalysisGroup<agName, def> passName ## _ag(passName ## _info);
>
> +#define INITIALIZE_AG_PASS_BEGIN(passName, agName, arg, n, cfg, analysis, def) \
> + void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
> + initialize##agName##AnalysisGroup(Registry);
> +
> +#define INITIALIZE_AG_PASS_END(passName, agName, arg, n, cfg, analysis, def) \
> + PassInfo *PI = new PassInfo(n, arg, & passName ::ID, \
> + PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
> + Registry.registerPass(*PI); \
> + \
> + PassInfo *AI = new PassInfo(n, & agName :: ID); \
> + Registry.registerAnalysisGroup(& agName ::ID, & passName ::ID, *AI, def); \
> + } \
> + static RegisterPass<passName> passName ## _info(arg, n, cfg, analysis); \
> + static RegisterAnalysisGroup<agName, def> passName ## _ag(passName ## _info);
> +
> //===---------------------------------------------------------------------------
> /// PassRegistrationListener class - This class is meant to be derived from by
> /// clients that are interested in which passes get registered and unregistered
>
> Modified: llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp (original)
> +++ llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp Tue Oct 12 14:48:12 2010
> @@ -74,7 +74,10 @@
> }
>
> char AAEval::ID = 0;
> -INITIALIZE_PASS(AAEval, "aa-eval",
> +INITIALIZE_PASS_BEGIN(AAEval, "aa-eval",
> + "Exhaustive Alias Analysis Precision Evaluator", false, true)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(AAEval, "aa-eval",
> "Exhaustive Alias Analysis Precision Evaluator", false, true)
>
> FunctionPass *llvm::createAAEvalPass() { return new AAEval(); }
>
> Modified: llvm/trunk/lib/Analysis/AliasSetTracker.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasSetTracker.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/AliasSetTracker.cpp (original)
> +++ llvm/trunk/lib/Analysis/AliasSetTracker.cpp Tue Oct 12 14:48:12 2010
> @@ -607,5 +607,8 @@
> }
>
> char AliasSetPrinter::ID = 0;
> -INITIALIZE_PASS(AliasSetPrinter, "print-alias-sets",
> +INITIALIZE_PASS_BEGIN(AliasSetPrinter, "print-alias-sets",
> + "Alias Set Printer", false, true)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(AliasSetPrinter, "print-alias-sets",
> "Alias Set Printer", false, true)
>
> Modified: llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp (original)
> +++ llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp Tue Oct 12 14:48:12 2010
> @@ -176,7 +176,11 @@
> }
>
> char GlobalsModRef::ID = 0;
> -INITIALIZE_AG_PASS(GlobalsModRef, AliasAnalysis,
> +INITIALIZE_AG_PASS_BEGIN(GlobalsModRef, AliasAnalysis,
> + "globalsmodref-aa", "Simple mod/ref analysis for globals",
> + false, true, false)
> +INITIALIZE_AG_DEPENDENCY(CallGraph)
> +INITIALIZE_AG_PASS_END(GlobalsModRef, AliasAnalysis,
> "globalsmodref-aa", "Simple mod/ref analysis for globals",
> false, true, false)
>
>
> Modified: llvm/trunk/lib/Analysis/IVUsers.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IVUsers.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/IVUsers.cpp (original)
> +++ llvm/trunk/lib/Analysis/IVUsers.cpp Tue Oct 12 14:48:12 2010
> @@ -28,7 +28,13 @@
> using namespace llvm;
>
> char IVUsers::ID = 0;
> -INITIALIZE_PASS(IVUsers, "iv-users", "Induction Variable Users", false, true)
> +INITIALIZE_PASS_BEGIN(IVUsers, "iv-users",
> + "Induction Variable Users", false, true)
> +INITIALIZE_PASS_DEPENDENCY(LoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
> +INITIALIZE_PASS_END(IVUsers, "iv-users",
> + "Induction Variable Users", false, true)
>
> Pass *llvm::createIVUsersPass() {
> return new IVUsers();
>
> Modified: llvm/trunk/lib/Analysis/Lint.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/Lint.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/Lint.cpp (original)
> +++ llvm/trunk/lib/Analysis/Lint.cpp Tue Oct 12 14:48:12 2010
> @@ -145,7 +145,12 @@
> }
>
> char Lint::ID = 0;
> -INITIALIZE_PASS(Lint, "lint", "Statically lint-checks LLVM IR", false, true)
> +INITIALIZE_PASS_BEGIN(Lint, "lint", "Statically lint-checks LLVM IR",
> + false, true)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(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) \
>
> Modified: llvm/trunk/lib/Analysis/LiveValues.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LiveValues.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/LiveValues.cpp (original)
> +++ llvm/trunk/lib/Analysis/LiveValues.cpp Tue Oct 12 14:48:12 2010
> @@ -22,7 +22,11 @@
> }
>
> char LiveValues::ID = 0;
> -INITIALIZE_PASS(LiveValues, "live-values",
> +INITIALIZE_PASS_BEGIN(LiveValues, "live-values",
> + "Value Liveness Analysis", false, true)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(LoopInfo)
> +INITIALIZE_PASS_END(LiveValues, "live-values",
> "Value Liveness Analysis", false, true)
>
> LiveValues::LiveValues() : FunctionPass(ID) {}
>
> Modified: llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp (original)
> +++ llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp Tue Oct 12 14:48:12 2010
> @@ -46,7 +46,11 @@
> return new LoopDependenceAnalysis();
> }
>
> -INITIALIZE_PASS(LoopDependenceAnalysis, "lda",
> +INITIALIZE_PASS_BEGIN(LoopDependenceAnalysis, "lda",
> + "Loop Dependence Analysis", false, true)
> +INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(LoopDependenceAnalysis, "lda",
> "Loop Dependence Analysis", false, true)
> char LoopDependenceAnalysis::ID = 0;
>
>
> Modified: llvm/trunk/lib/Analysis/LoopInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopInfo.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/LoopInfo.cpp (original)
> +++ llvm/trunk/lib/Analysis/LoopInfo.cpp Tue Oct 12 14:48:12 2010
> @@ -38,7 +38,9 @@
> cl::desc("Verify loop info (time consuming)"));
>
> char LoopInfo::ID = 0;
> -INITIALIZE_PASS(LoopInfo, "loops", "Natural Loop Information", true, true)
> +INITIALIZE_PASS_BEGIN(LoopInfo, "loops", "Natural Loop Information", true, true)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_END(LoopInfo, "loops", "Natural Loop Information", true, true)
>
> //===----------------------------------------------------------------------===//
> // Loop implementation
>
> Modified: llvm/trunk/lib/Analysis/MemDepPrinter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemDepPrinter.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/MemDepPrinter.cpp (original)
> +++ llvm/trunk/lib/Analysis/MemDepPrinter.cpp Tue Oct 12 14:48:12 2010
> @@ -50,8 +50,11 @@
> }
>
> char MemDepPrinter::ID = 0;
> -INITIALIZE_PASS(MemDepPrinter, "print-memdeps", "Print MemDeps of function",
> - false, true)
> +INITIALIZE_PASS_BEGIN(MemDepPrinter, "print-memdeps",
> + "Print MemDeps of function", false, true)
> +INITIALIZE_PASS_DEPENDENCY(MemoryDependenceAnalysis)
> +INITIALIZE_PASS_END(MemDepPrinter, "print-memdeps",
> + "Print MemDeps of function", false, true)
>
> FunctionPass *llvm::createMemDepPrinter() {
> return new MemDepPrinter();
>
> Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
> +++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Tue Oct 12 14:48:12 2010
> @@ -47,8 +47,11 @@
> char MemoryDependenceAnalysis::ID = 0;
>
> // Register this pass...
> -INITIALIZE_PASS(MemoryDependenceAnalysis, "memdep",
> +INITIALIZE_PASS_BEGIN(MemoryDependenceAnalysis, "memdep",
> "Memory Dependence Analysis", false, true)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(MemoryDependenceAnalysis, "memdep",
> + "Memory Dependence Analysis", false, true)
>
> MemoryDependenceAnalysis::MemoryDependenceAnalysis()
> : FunctionPass(ID), PredCache(0) {
>
> Modified: llvm/trunk/lib/Analysis/PostDominators.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PostDominators.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/PostDominators.cpp (original)
> +++ llvm/trunk/lib/Analysis/PostDominators.cpp Tue Oct 12 14:48:12 2010
> @@ -53,7 +53,10 @@
> // PostDominanceFrontier Implementation
> //===----------------------------------------------------------------------===//
>
> -INITIALIZE_PASS(PostDominanceFrontier, "postdomfrontier",
> +INITIALIZE_PASS_BEGIN(PostDominanceFrontier, "postdomfrontier",
> + "Post-Dominance Frontier Construction", true, true)
> +INITIALIZE_PASS_DEPENDENCY(PostDominatorTree)
> +INITIALIZE_PASS_END(PostDominanceFrontier, "postdomfrontier",
> "Post-Dominance Frontier Construction", true, true)
>
> const DominanceFrontier::DomSetType &
>
> Modified: llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp (original)
> +++ llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp Tue Oct 12 14:48:12 2010
> @@ -72,7 +72,10 @@
> } // End of anonymous namespace
>
> char ProfileEstimatorPass::ID = 0;
> -INITIALIZE_AG_PASS(ProfileEstimatorPass, ProfileInfo, "profile-estimator",
> +INITIALIZE_AG_PASS_BEGIN(ProfileEstimatorPass, ProfileInfo, "profile-estimator",
> + "Estimate profiling information", false, true, false)
> +INITIALIZE_PASS_DEPENDENCY(LoopInfo)
> +INITIALIZE_AG_PASS_END(ProfileEstimatorPass, ProfileInfo, "profile-estimator",
> "Estimate profiling information", false, true, false)
>
> namespace llvm {
>
> Modified: llvm/trunk/lib/Analysis/ProfileVerifierPass.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileVerifierPass.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/ProfileVerifierPass.cpp (original)
> +++ llvm/trunk/lib/Analysis/ProfileVerifierPass.cpp Tue Oct 12 14:48:12 2010
> @@ -366,7 +366,10 @@
> char ProfileVerifierPassT<FType, BType>::ID = 0;
> }
>
> -INITIALIZE_PASS(ProfileVerifierPass, "profile-verifier",
> +INITIALIZE_PASS_BEGIN(ProfileVerifierPass, "profile-verifier",
> + "Verify profiling information", false, true)
> +INITIALIZE_AG_DEPENDENCY(ProfileInfo)
> +INITIALIZE_PASS_END(ProfileVerifierPass, "profile-verifier",
> "Verify profiling information", false, true)
>
> namespace llvm {
>
> Modified: llvm/trunk/lib/Analysis/RegionInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/RegionInfo.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/RegionInfo.cpp (original)
> +++ llvm/trunk/lib/Analysis/RegionInfo.cpp Tue Oct 12 14:48:12 2010
> @@ -734,7 +734,12 @@
> }
>
> char RegionInfo::ID = 0;
> -INITIALIZE_PASS(RegionInfo, "regions",
> +INITIALIZE_PASS_BEGIN(RegionInfo, "regions",
> + "Detect single entry single exit regions", true, true)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(PostDominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(DominanceFrontier)
> +INITIALIZE_PASS_END(RegionInfo, "regions",
> "Detect single entry single exit regions", true, true)
>
> // Create methods available outside of this file, to use them
>
> Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
> +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Tue Oct 12 14:48:12 2010
> @@ -103,7 +103,11 @@
> "derived loop"),
> cl::init(100));
>
> -INITIALIZE_PASS(ScalarEvolution, "scalar-evolution",
> +INITIALIZE_PASS_BEGIN(ScalarEvolution, "scalar-evolution",
> + "Scalar Evolution Analysis", false, true)
> +INITIALIZE_PASS_DEPENDENCY(LoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_END(ScalarEvolution, "scalar-evolution",
> "Scalar Evolution Analysis", false, true)
> char ScalarEvolution::ID = 0;
>
>
> Modified: llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp (original)
> +++ llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp Tue Oct 12 14:48:12 2010
> @@ -57,8 +57,11 @@
>
> // Register this pass...
> char ScalarEvolutionAliasAnalysis::ID = 0;
> -INITIALIZE_AG_PASS(ScalarEvolutionAliasAnalysis, AliasAnalysis, "scev-aa",
> +INITIALIZE_AG_PASS_BEGIN(ScalarEvolutionAliasAnalysis, AliasAnalysis, "scev-aa",
> "ScalarEvolution-based Alias Analysis", false, true, false)
> +INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
> +INITIALIZE_AG_PASS_END(ScalarEvolutionAliasAnalysis, AliasAnalysis, "scev-aa",
> + "ScalarEvolution-based Alias Analysis", false, true, false)
>
> FunctionPass *llvm::createScalarEvolutionAliasAnalysisPass() {
> return new ScalarEvolutionAliasAnalysis();
>
> Modified: llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp (original)
> +++ llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp Tue Oct 12 14:48:12 2010
> @@ -25,7 +25,11 @@
> using namespace llvm;
>
> char CalculateSpillWeights::ID = 0;
> -INITIALIZE_PASS(CalculateSpillWeights, "calcspillweights",
> +INITIALIZE_PASS_BEGIN(CalculateSpillWeights, "calcspillweights",
> + "Calculate spill weights", false, false)
> +INITIALIZE_PASS_DEPENDENCY(LiveIntervals)
> +INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
> +INITIALIZE_PASS_END(CalculateSpillWeights, "calcspillweights",
> "Calculate spill weights", false, false)
>
> void CalculateSpillWeights::getAnalysisUsage(AnalysisUsage &au) const {
>
> Modified: llvm/trunk/lib/CodeGen/IfConversion.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IfConversion.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/IfConversion.cpp (original)
> +++ llvm/trunk/lib/CodeGen/IfConversion.cpp Tue Oct 12 14:48:12 2010
> @@ -245,7 +245,9 @@
> char IfConverter::ID = 0;
> }
>
> -INITIALIZE_PASS(IfConverter, "if-converter", "If Converter", false, false)
> +INITIALIZE_PASS_BEGIN(IfConverter, "if-converter", "If Converter", false, false)
> +INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
> +INITIALIZE_PASS_END(IfConverter, "if-converter", "If Converter", false, false)
>
> FunctionPass *llvm::createIfConverterPass() { return new IfConverter(); }
>
>
> Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Oct 12 14:48:12 2010
> @@ -55,7 +55,16 @@
> STATISTIC(numSplits , "Number of intervals split");
>
> char LiveIntervals::ID = 0;
> -INITIALIZE_PASS(LiveIntervals, "liveintervals",
> +INITIALIZE_PASS_BEGIN(LiveIntervals, "liveintervals",
> + "Live Interval Analysis", false, false)
> +INITIALIZE_PASS_DEPENDENCY(LiveVariables)
> +INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(PHIElimination)
> +INITIALIZE_PASS_DEPENDENCY(TwoAddressInstructionPass)
> +INITIALIZE_PASS_DEPENDENCY(ProcessImplicitDefs)
> +INITIALIZE_PASS_DEPENDENCY(SlotIndexes)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(LiveIntervals, "liveintervals",
> "Live Interval Analysis", false, false)
>
> void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const {
>
> Modified: llvm/trunk/lib/CodeGen/LiveVariables.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveVariables.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/LiveVariables.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LiveVariables.cpp Tue Oct 12 14:48:12 2010
> @@ -42,7 +42,10 @@
> using namespace llvm;
>
> char LiveVariables::ID = 0;
> -INITIALIZE_PASS(LiveVariables, "livevars",
> +INITIALIZE_PASS_BEGIN(LiveVariables, "livevars",
> + "Live Variable Analysis", false, false)
> +INITIALIZE_PASS_DEPENDENCY(UnreachableMachineBlockElim)
> +INITIALIZE_PASS_END(LiveVariables, "livevars",
> "Live Variable Analysis", false, false)
>
>
>
> Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Tue Oct 12 14:48:12 2010
> @@ -91,7 +91,11 @@
> } // end anonymous namespace
>
> char MachineCSE::ID = 0;
> -INITIALIZE_PASS(MachineCSE, "machine-cse",
> +INITIALIZE_PASS_BEGIN(MachineCSE, "machine-cse",
> + "Machine Common Subexpression Elimination", false, false)
> +INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(MachineCSE, "machine-cse",
> "Machine Common Subexpression Elimination", false, false)
>
> FunctionPass *llvm::createMachineCSEPass() { return new MachineCSE(); }
>
> Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Tue Oct 12 14:48:12 2010
> @@ -189,7 +189,12 @@
> } // end anonymous namespace
>
> char MachineLICM::ID = 0;
> -INITIALIZE_PASS(MachineLICM, "machinelicm",
> +INITIALIZE_PASS_BEGIN(MachineLICM, "machinelicm",
> + "Machine Loop Invariant Code Motion", false, false)
> +INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(MachineLICM, "machinelicm",
> "Machine Loop Invariant Code Motion", false, false)
>
> FunctionPass *llvm::createMachineLICMPass(bool PreRegAlloc) {
>
> Modified: llvm/trunk/lib/CodeGen/MachineLoopInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLoopInfo.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineLoopInfo.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineLoopInfo.cpp Tue Oct 12 14:48:12 2010
> @@ -30,7 +30,10 @@
> }
>
> char MachineLoopInfo::ID = 0;
> -INITIALIZE_PASS(MachineLoopInfo, "machine-loops",
> +INITIALIZE_PASS_BEGIN(MachineLoopInfo, "machine-loops",
> + "Machine Natural Loop Construction", true, true)
> +INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
> +INITIALIZE_PASS_END(MachineLoopInfo, "machine-loops",
> "Machine Natural Loop Construction", true, true)
>
> char &llvm::MachineLoopInfoID = MachineLoopInfo::ID;
>
> Modified: llvm/trunk/lib/CodeGen/MachineSink.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineSink.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineSink.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineSink.cpp Tue Oct 12 14:48:12 2010
> @@ -94,7 +94,12 @@
> } // end anonymous namespace
>
> char MachineSinking::ID = 0;
> -INITIALIZE_PASS(MachineSinking, "machine-sink",
> +INITIALIZE_PASS_BEGIN(MachineSinking, "machine-sink",
> + "Machine code sinking", false, false)
> +INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(MachineSinking, "machine-sink",
> "Machine code sinking", false, false)
>
> FunctionPass *llvm::createMachineSinkingPass() { return new MachineSinking(); }
>
> Modified: llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp (original)
> +++ llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp Tue Oct 12 14:48:12 2010
> @@ -84,7 +84,10 @@
> }
>
> char PeepholeOptimizer::ID = 0;
> -INITIALIZE_PASS(PeepholeOptimizer, "peephole-opts",
> +INITIALIZE_PASS_BEGIN(PeepholeOptimizer, "peephole-opts",
> + "Peephole Optimizations", false, false)
> +INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
> +INITIALIZE_PASS_END(PeepholeOptimizer, "peephole-opts",
> "Peephole Optimizations", false, false)
>
> FunctionPass *llvm::createPeepholeOptimizerPass() {
>
> Modified: llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp (original)
> +++ llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp Tue Oct 12 14:48:12 2010
> @@ -203,7 +203,16 @@
>
> char PreAllocSplitting::ID = 0;
>
> -INITIALIZE_PASS(PreAllocSplitting, "pre-alloc-splitting",
> +INITIALIZE_PASS_BEGIN(PreAllocSplitting, "pre-alloc-splitting",
> + "Pre-Register Allocation Live Interval Splitting",
> + false, false)
> +INITIALIZE_PASS_DEPENDENCY(SlotIndexes)
> +INITIALIZE_PASS_DEPENDENCY(LiveIntervals)
> +INITIALIZE_PASS_DEPENDENCY(LiveStacks)
> +INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(VirtRegMap)
> +INITIALIZE_PASS_END(PreAllocSplitting, "pre-alloc-splitting",
> "Pre-Register Allocation Live Interval Splitting",
> false, false)
>
>
> Modified: llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp (original)
> +++ llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp Tue Oct 12 14:48:12 2010
> @@ -26,7 +26,10 @@
> using namespace llvm;
>
> char ProcessImplicitDefs::ID = 0;
> -INITIALIZE_PASS(ProcessImplicitDefs, "processimpdefs",
> +INITIALIZE_PASS_BEGIN(ProcessImplicitDefs, "processimpdefs",
> + "Process Implicit Definitions.", false, false)
> +INITIALIZE_PASS_DEPENDENCY(LiveVariables)
> +INITIALIZE_PASS_END(ProcessImplicitDefs, "processimpdefs",
> "Process Implicit Definitions.", false, false)
>
> void ProcessImplicitDefs::getAnalysisUsage(AnalysisUsage &AU) const {
>
> Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original)
> +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Tue Oct 12 14:48:12 2010
> @@ -44,7 +44,11 @@
>
> char PEI::ID = 0;
>
> -INITIALIZE_PASS(PEI, "prologepilog",
> +INITIALIZE_PASS_BEGIN(PEI, "prologepilog",
> + "Prologue/Epilogue Insertion", false, false)
> +INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
> +INITIALIZE_PASS_END(PEI, "prologepilog",
> "Prologue/Epilogue Insertion", false, false)
>
> STATISTIC(NumVirtualFrameRegs, "Number of virtual frame regs encountered");
>
> Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original)
> +++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Tue Oct 12 14:48:12 2010
> @@ -370,7 +370,17 @@
> char RALinScan::ID = 0;
> }
>
> -INITIALIZE_PASS(RALinScan, "linearscan-regalloc",
> +INITIALIZE_PASS_BEGIN(RALinScan, "linearscan-regalloc",
> + "Linear Scan Register Allocator", false, false)
> +INITIALIZE_PASS_DEPENDENCY(LiveIntervals)
> +INITIALIZE_PASS_DEPENDENCY(StrongPHIElimination)
> +INITIALIZE_PASS_DEPENDENCY(CalculateSpillWeights)
> +INITIALIZE_PASS_DEPENDENCY(PreAllocSplitting)
> +INITIALIZE_PASS_DEPENDENCY(LiveStacks)
> +INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(VirtRegMap)
> +INITIALIZE_AG_DEPENDENCY(RegisterCoalescer)
> +INITIALIZE_PASS_END(RALinScan, "linearscan-regalloc",
> "Linear Scan Register Allocator", false, false)
>
> void RALinScan::ComputeRelatedRegClasses() {
>
> Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp (original)
> +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Tue Oct 12 14:48:12 2010
> @@ -30,7 +30,12 @@
> using namespace llvm;
>
> char RenderMachineFunction::ID = 0;
> -INITIALIZE_PASS(RenderMachineFunction, "rendermf",
> +INITIALIZE_PASS_BEGIN(RenderMachineFunction, "rendermf",
> + "Render machine functions (and related info) to HTML pages",
> + false, false)
> +INITIALIZE_PASS_DEPENDENCY(SlotIndexes)
> +INITIALIZE_PASS_DEPENDENCY(LiveIntervals)
> +INITIALIZE_PASS_END(RenderMachineFunction, "rendermf",
> "Render machine functions (and related info) to HTML pages",
> false, false)
>
>
> Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Tue Oct 12 14:48:12 2010
> @@ -64,7 +64,17 @@
> cl::desc("Avoid coalescing physical register copies"),
> cl::init(false), cl::Hidden);
>
> -INITIALIZE_AG_PASS(SimpleRegisterCoalescing, RegisterCoalescer,
> +INITIALIZE_AG_PASS_BEGIN(SimpleRegisterCoalescing, RegisterCoalescer,
> + "simple-register-coalescing", "Simple Register Coalescing",
> + false, false, true)
> +INITIALIZE_PASS_DEPENDENCY(LiveIntervals)
> +INITIALIZE_PASS_DEPENDENCY(SlotIndexes)
> +INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(StrongPHIElimination)
> +INITIALIZE_PASS_DEPENDENCY(PHIElimination)
> +INITIALIZE_PASS_DEPENDENCY(TwoAddressInstructionPass)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_AG_PASS_END(SimpleRegisterCoalescing, RegisterCoalescer,
> "simple-register-coalescing", "Simple Register Coalescing",
> false, false, true)
>
>
> Modified: llvm/trunk/lib/CodeGen/Splitter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Splitter.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/Splitter.cpp (original)
> +++ llvm/trunk/lib/CodeGen/Splitter.cpp Tue Oct 12 14:48:12 2010
> @@ -29,7 +29,13 @@
> using namespace llvm;
>
> char LoopSplitter::ID = 0;
> -INITIALIZE_PASS(LoopSplitter, "loop-splitting",
> +INITIALIZE_PASS_BEGIN(LoopSplitter, "loop-splitting",
> + "Split virtual regists across loop boundaries.", false, false)
> +INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(SlotIndexes)
> +INITIALIZE_PASS_DEPENDENCY(LiveIntervals)
> +INITIALIZE_PASS_END(LoopSplitter, "loop-splitting",
> "Split virtual regists across loop boundaries.", false, false)
>
> namespace llvm {
>
> Modified: llvm/trunk/lib/CodeGen/StackSlotColoring.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackSlotColoring.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/StackSlotColoring.cpp (original)
> +++ llvm/trunk/lib/CodeGen/StackSlotColoring.cpp Tue Oct 12 14:48:12 2010
> @@ -145,7 +145,13 @@
>
> char StackSlotColoring::ID = 0;
>
> -INITIALIZE_PASS(StackSlotColoring, "stack-slot-coloring",
> +INITIALIZE_PASS_BEGIN(StackSlotColoring, "stack-slot-coloring",
> + "Stack Slot Coloring", false, false)
> +INITIALIZE_PASS_DEPENDENCY(SlotIndexes)
> +INITIALIZE_PASS_DEPENDENCY(LiveStacks)
> +INITIALIZE_PASS_DEPENDENCY(VirtRegMap)
> +INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
> +INITIALIZE_PASS_END(StackSlotColoring, "stack-slot-coloring",
> "Stack Slot Coloring", false, false)
>
> FunctionPass *llvm::createStackSlotColoringPass(bool RegColor) {
>
> Modified: llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp (original)
> +++ llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp Tue Oct 12 14:48:12 2010
> @@ -150,7 +150,12 @@
> }
>
> char StrongPHIElimination::ID = 0;
> -INITIALIZE_PASS(StrongPHIElimination, "strong-phi-node-elimination",
> +INITIALIZE_PASS_BEGIN(StrongPHIElimination, "strong-phi-node-elimination",
> + "Eliminate PHI nodes for register allocation, intelligently", false, false)
> +INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(SlotIndexes)
> +INITIALIZE_PASS_DEPENDENCY(LiveIntervals)
> +INITIALIZE_PASS_END(StrongPHIElimination, "strong-phi-node-elimination",
> "Eliminate PHI nodes for register allocation, intelligently", false, false)
>
> char &llvm::StrongPHIEliminationID = StrongPHIElimination::ID;
>
> Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
> +++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Tue Oct 12 14:48:12 2010
> @@ -159,7 +159,10 @@
> }
>
> char TwoAddressInstructionPass::ID = 0;
> -INITIALIZE_PASS(TwoAddressInstructionPass, "twoaddressinstruction",
> +INITIALIZE_PASS_BEGIN(TwoAddressInstructionPass, "twoaddressinstruction",
> + "Two-Address instruction pass", false, false)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(TwoAddressInstructionPass, "twoaddressinstruction",
> "Two-Address instruction pass", false, false)
>
> char &llvm::TwoAddressInstructionPassID = TwoAddressInstructionPass::ID;
>
> Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Tue Oct 12 14:48:12 2010
> @@ -84,7 +84,10 @@
> }
>
> char ArgPromotion::ID = 0;
> -INITIALIZE_PASS(ArgPromotion, "argpromotion",
> +INITIALIZE_PASS_BEGIN(ArgPromotion, "argpromotion",
> + "Promote 'by reference' arguments to scalars", false, false)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(ArgPromotion, "argpromotion",
> "Promote 'by reference' arguments to scalars", false, false)
>
> Pass *llvm::createArgumentPromotionPass(unsigned maxElements) {
>
> Modified: llvm/trunk/lib/Transforms/IPO/DeadTypeElimination.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/DeadTypeElimination.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/IPO/DeadTypeElimination.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/DeadTypeElimination.cpp Tue Oct 12 14:48:12 2010
> @@ -45,7 +45,10 @@
> }
>
> char DTE::ID = 0;
> -INITIALIZE_PASS(DTE, "deadtypeelim", "Dead Type Elimination", false, false)
> +INITIALIZE_PASS_BEGIN(DTE, "deadtypeelim", "Dead Type Elimination",
> + false, false)
> +INITIALIZE_PASS_DEPENDENCY(FindUsedTypes)
> +INITIALIZE_PASS_END(DTE, "deadtypeelim", "Dead Type Elimination", false, false)
>
> ModulePass *llvm::createDeadTypeEliminationPass() {
> return new DTE();
>
> Modified: llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp Tue Oct 12 14:48:12 2010
> @@ -50,7 +50,12 @@
> }
>
> char LoopExtractor::ID = 0;
> -INITIALIZE_PASS(LoopExtractor, "loop-extract",
> +INITIALIZE_PASS_BEGIN(LoopExtractor, "loop-extract",
> + "Extract loops into new functions", false, false)
> +INITIALIZE_PASS_DEPENDENCY(BreakCriticalEdges)
> +INITIALIZE_PASS_DEPENDENCY(LoopSimplify)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_END(LoopExtractor, "loop-extract",
> "Extract loops into new functions", false, false)
>
> namespace {
>
> Modified: llvm/trunk/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp (original)
> +++ llvm/trunk/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp Tue Oct 12 14:48:12 2010
> @@ -50,7 +50,12 @@
> }
>
> char OptimalEdgeProfiler::ID = 0;
> -INITIALIZE_PASS(OptimalEdgeProfiler, "insert-optimal-edge-profiling",
> +INITIALIZE_PASS_BEGIN(OptimalEdgeProfiler, "insert-optimal-edge-profiling",
> + "Insert optimal instrumentation for edge profiling",
> + false, false)
> +INITIALIZE_PASS_DEPENDENCY(ProfileEstimatorPass)
> +INITIALIZE_AG_DEPENDENCY(ProfileInfo)
> +INITIALIZE_PASS_END(OptimalEdgeProfiler, "insert-optimal-edge-profiling",
> "Insert optimal instrumentation for edge profiling",
> false, false)
>
>
> Modified: llvm/trunk/lib/Transforms/Scalar/BasicBlockPlacement.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/BasicBlockPlacement.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/BasicBlockPlacement.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/BasicBlockPlacement.cpp Tue Oct 12 14:48:12 2010
> @@ -74,7 +74,10 @@
> }
>
> char BlockPlacement::ID = 0;
> -INITIALIZE_PASS(BlockPlacement, "block-placement",
> +INITIALIZE_PASS_BEGIN(BlockPlacement, "block-placement",
> + "Profile Guided Basic Block Placement", false, false)
> +INITIALIZE_AG_DEPENDENCY(ProfileInfo)
> +INITIALIZE_PASS_END(BlockPlacement, "block-placement",
> "Profile Guided Basic Block Placement", false, false)
>
> FunctionPass *llvm::createBlockPlacementPass() { return new BlockPlacement(); }
>
> Modified: llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp Tue Oct 12 14:48:12 2010
> @@ -50,7 +50,10 @@
> }
>
> char CorrelatedValuePropagation::ID = 0;
> -INITIALIZE_PASS(CorrelatedValuePropagation, "correlated-propagation",
> +INITIALIZE_PASS_BEGIN(CorrelatedValuePropagation, "correlated-propagation",
> + "Value Propagation", false, false)
> +INITIALIZE_PASS_DEPENDENCY(LazyValueInfo)
> +INITIALIZE_PASS_END(CorrelatedValuePropagation, "correlated-propagation",
> "Value Propagation", false, false)
>
> // Public interface to the Value Propagation pass
>
> Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Tue Oct 12 14:48:12 2010
> @@ -82,7 +82,11 @@
> }
>
> char DSE::ID = 0;
> -INITIALIZE_PASS(DSE, "dse", "Dead Store Elimination", false, false)
> +INITIALIZE_PASS_BEGIN(DSE, "dse", "Dead Store Elimination", false, false)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(MemoryDependenceAnalysis)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(DSE, "dse", "Dead Store Elimination", false, false)
>
> FunctionPass *llvm::createDeadStoreEliminationPass() { return new DSE(); }
>
>
> Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue Oct 12 14:48:12 2010
> @@ -713,7 +713,11 @@
> return new GVN(NoLoads);
> }
>
> -INITIALIZE_PASS(GVN, "gvn", "Global Value Numbering", false, false)
> +INITIALIZE_PASS_BEGIN(GVN, "gvn", "Global Value Numbering", false, false)
> +INITIALIZE_PASS_DEPENDENCY(MemoryDependenceAnalysis)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(GVN, "gvn", "Global Value Numbering", false, false)
>
> void GVN::dump(DenseMap<uint32_t, Value*>& d) {
> errs() << "{\n";
>
> Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Tue Oct 12 14:48:12 2010
> @@ -117,7 +117,15 @@
> }
>
> char IndVarSimplify::ID = 0;
> -INITIALIZE_PASS(IndVarSimplify, "indvars",
> +INITIALIZE_PASS_BEGIN(IndVarSimplify, "indvars",
> + "Canonicalize Induction Variables", false, false)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(LoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
> +INITIALIZE_PASS_DEPENDENCY(LoopSimplify)
> +INITIALIZE_PASS_DEPENDENCY(LCSSA)
> +INITIALIZE_PASS_DEPENDENCY(IVUsers)
> +INITIALIZE_PASS_END(IndVarSimplify, "indvars",
> "Canonicalize Induction Variables", false, false)
>
> Pass *llvm::createIndVarSimplifyPass() {
>
> Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Tue Oct 12 14:48:12 2010
> @@ -121,7 +121,10 @@
> }
>
> char JumpThreading::ID = 0;
> -INITIALIZE_PASS(JumpThreading, "jump-threading",
> +INITIALIZE_PASS_BEGIN(JumpThreading, "jump-threading",
> + "Jump Threading", false, false)
> +INITIALIZE_PASS_DEPENDENCY(LazyValueInfo)
> +INITIALIZE_PASS_END(JumpThreading, "jump-threading",
> "Jump Threading", false, false)
>
> // Public interface to the Jump Threading pass
>
> Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Tue Oct 12 14:48:12 2010
> @@ -200,7 +200,13 @@
> }
>
> char LICM::ID = 0;
> -INITIALIZE_PASS(LICM, "licm", "Loop Invariant Code Motion", false, false)
> +INITIALIZE_PASS_BEGIN(LICM, "licm", "Loop Invariant Code Motion", false, false)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(LoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
> +INITIALIZE_PASS_DEPENDENCY(LoopSimplify)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(LICM, "licm", "Loop Invariant Code Motion", false, false)
>
> Pass *llvm::createLICMPass() { return new LICM(); }
>
>
> Modified: llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp Tue Oct 12 14:48:12 2010
> @@ -55,7 +55,15 @@
> }
>
> char LoopDeletion::ID = 0;
> -INITIALIZE_PASS(LoopDeletion, "loop-deletion",
> +INITIALIZE_PASS_BEGIN(LoopDeletion, "loop-deletion",
> + "Delete dead loops", false, false)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(LoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
> +INITIALIZE_PASS_DEPENDENCY(LoopSimplify)
> +INITIALIZE_PASS_DEPENDENCY(LCSSA)
> +INITIALIZE_PASS_DEPENDENCY(DominanceFrontier)
> +INITIALIZE_PASS_END(LoopDeletion, "loop-deletion",
> "Delete dead loops", false, false)
>
> Pass* llvm::createLoopDeletionPass() {
>
> Modified: llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp Tue Oct 12 14:48:12 2010
> @@ -79,7 +79,14 @@
> }
>
> char LoopRotate::ID = 0;
> -INITIALIZE_PASS(LoopRotate, "loop-rotate", "Rotate Loops", false, false)
> +INITIALIZE_PASS_BEGIN(LoopRotate, "loop-rotate", "Rotate Loops", false, false)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(DominanceFrontier)
> +INITIALIZE_PASS_DEPENDENCY(LoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(LoopSimplify)
> +INITIALIZE_PASS_DEPENDENCY(LCSSA)
> +INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
> +INITIALIZE_PASS_END(LoopRotate, "loop-rotate", "Rotate Loops", false, false)
>
> Pass *llvm::createLoopRotatePass() { return new LoopRotate(); }
>
>
> Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Tue Oct 12 14:48:12 2010
> @@ -3791,8 +3791,16 @@
> }
>
> char LoopStrengthReduce::ID = 0;
> -INITIALIZE_PASS(LoopStrengthReduce, "loop-reduce",
> +INITIALIZE_PASS_BEGIN(LoopStrengthReduce, "loop-reduce",
> "Loop Strength Reduction", false, false)
> +INITIALIZE_PASS_DEPENDENCY(LoopSimplify)
> +INITIALIZE_PASS_DEPENDENCY(DominanceFrontier)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
> +INITIALIZE_PASS_DEPENDENCY(IVUsers)
> +INITIALIZE_PASS_END(LoopStrengthReduce, "loop-reduce",
> + "Loop Strength Reduction", false, false)
> +
>
> Pass *llvm::createLoopStrengthReducePass(const TargetLowering *TLI) {
> return new LoopStrengthReduce(TLI);
>
> Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp Tue Oct 12 14:48:12 2010
> @@ -79,7 +79,13 @@
> }
>
> char LoopUnroll::ID = 0;
> -INITIALIZE_PASS(LoopUnroll, "loop-unroll", "Unroll loops", false, false)
> +INITIALIZE_PASS_BEGIN(LoopUnroll, "loop-unroll", "Unroll loops", false, false)
> +INITIALIZE_PASS_DEPENDENCY(LoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(LoopSimplify)
> +INITIALIZE_PASS_DEPENDENCY(LCSSA)
> +INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_END(LoopUnroll, "loop-unroll", "Unroll loops", false, false)
>
> Pass *llvm::createLoopUnrollPass() { return new LoopUnroll(); }
>
>
> Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Tue Oct 12 14:48:12 2010
> @@ -158,7 +158,14 @@
> };
> }
> char LoopUnswitch::ID = 0;
> -INITIALIZE_PASS(LoopUnswitch, "loop-unswitch", "Unswitch loops", false, false)
> +INITIALIZE_PASS_BEGIN(LoopUnswitch, "loop-unswitch", "Unswitch loops",
> + false, false)
> +INITIALIZE_PASS_DEPENDENCY(LoopSimplify)
> +INITIALIZE_PASS_DEPENDENCY(LoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(LCSSA)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_END(LoopUnswitch, "loop-unswitch", "Unswitch loops",
> + false, false)
>
> Pass *llvm::createLoopUnswitchPass(bool Os) {
> return new LoopUnswitch(Os);
>
> Modified: llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp Tue Oct 12 14:48:12 2010
> @@ -331,8 +331,13 @@
> // createMemCpyOptPass - The public interface to this file...
> FunctionPass *llvm::createMemCpyOptPass() { return new MemCpyOpt(); }
>
> -INITIALIZE_PASS(MemCpyOpt, "memcpyopt", "MemCpy Optimization", false, false)
> -
> +INITIALIZE_PASS_BEGIN(MemCpyOpt, "memcpyopt", "MemCpy Optimization",
> + false, false)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(MemoryDependenceAnalysis)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(MemCpyOpt, "memcpyopt", "MemCpy Optimization",
> + false, false)
>
>
> /// processStore - When GVN is scanning forward over instructions, we look for
>
> Modified: llvm/trunk/lib/Transforms/Scalar/Reg2Mem.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/Reg2Mem.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/Reg2Mem.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/Reg2Mem.cpp Tue Oct 12 14:48:12 2010
> @@ -59,9 +59,11 @@
> }
>
> char RegToMem::ID = 0;
> -INITIALIZE_PASS(RegToMem, "reg2mem", "Demote all values to stack slots",
> +INITIALIZE_PASS_BEGIN(RegToMem, "reg2mem", "Demote all values to stack slots",
> + false, false)
> +INITIALIZE_PASS_DEPENDENCY(BreakCriticalEdges)
> +INITIALIZE_PASS_END(RegToMem, "reg2mem", "Demote all values to stack slots",
> false, false)
> -
>
> bool RegToMem::runOnFunction(Function &F) {
> if (F.isDeclaration())
>
> Modified: llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp Tue Oct 12 14:48:12 2010
> @@ -135,7 +135,11 @@
> }
>
> char SROA::ID = 0;
> -INITIALIZE_PASS(SROA, "scalarrepl",
> +INITIALIZE_PASS_BEGIN(SROA, "scalarrepl",
> + "Scalar Replacement of Aggregates", false, false)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(DominanceFrontier)
> +INITIALIZE_PASS_END(SROA, "scalarrepl",
> "Scalar Replacement of Aggregates", false, false)
>
> // Public interface to the ScalarReplAggregates pass
>
> Modified: llvm/trunk/lib/Transforms/Scalar/Sink.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/Sink.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/Sink.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/Sink.cpp Tue Oct 12 14:48:12 2010
> @@ -56,7 +56,11 @@
> } // end anonymous namespace
>
> char Sinking::ID = 0;
> -INITIALIZE_PASS(Sinking, "sink", "Code sinking", false, false)
> +INITIALIZE_PASS_BEGIN(Sinking, "sink", "Code sinking", false, false)
> +INITIALIZE_PASS_DEPENDENCY(LoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(Sinking, "sink", "Code sinking", false, false)
>
> FunctionPass *llvm::createSinkingPass() { return new Sinking(); }
>
>
> Modified: llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LCSSA.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Utils/LCSSA.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/LCSSA.cpp Tue Oct 12 14:48:12 2010
> @@ -90,7 +90,13 @@
> }
>
> char LCSSA::ID = 0;
> -INITIALIZE_PASS(LCSSA, "lcssa", "Loop-Closed SSA Form Pass", false, false)
> +INITIALIZE_PASS_BEGIN(LCSSA, "lcssa", "Loop-Closed SSA Form Pass", false, false)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(DominanceFrontier)
> +INITIALIZE_PASS_DEPENDENCY(LoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(LoopSimplify)
> +INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
> +INITIALIZE_PASS_END(LCSSA, "lcssa", "Loop-Closed SSA Form Pass", false, false)
>
> Pass *llvm::createLCSSAPass() { return new LCSSA(); }
> char &llvm::LCSSAID = LCSSA::ID;
>
> Modified: llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp Tue Oct 12 14:48:12 2010
> @@ -107,7 +107,16 @@
> }
>
> char LoopSimplify::ID = 0;
> -INITIALIZE_PASS(LoopSimplify, "loopsimplify",
> +INITIALIZE_PASS_BEGIN(LoopSimplify, "loopsimplify",
> + "Canonicalize natural loops", true, false)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(LoopInfo)
> +INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
> +INITIALIZE_PASS_DEPENDENCY(BreakCriticalEdges)
> +INITIALIZE_PASS_DEPENDENCY(DominanceFrontier)
> +INITIALIZE_PASS_DEPENDENCY(LCSSA)
> +INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
> +INITIALIZE_PASS_END(LoopSimplify, "loopsimplify",
> "Canonicalize natural loops", true, false)
>
> // Publically exposed interface to pass...
>
> Modified: llvm/trunk/lib/Transforms/Utils/Mem2Reg.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/Mem2Reg.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Utils/Mem2Reg.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/Mem2Reg.cpp Tue Oct 12 14:48:12 2010
> @@ -49,7 +49,14 @@
> } // end of anonymous namespace
>
> char PromotePass::ID = 0;
> -INITIALIZE_PASS(PromotePass, "mem2reg", "Promote Memory to Register",
> +INITIALIZE_PASS_BEGIN(PromotePass, "mem2reg", "Promote Memory to Register",
> + false, false)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_DEPENDENCY(DominanceFrontier)
> +INITIALIZE_PASS_DEPENDENCY(UnifyFunctionExitNodes)
> +INITIALIZE_PASS_DEPENDENCY(LowerSwitch)
> +INITIALIZE_PASS_DEPENDENCY(LowerInvoke)
> +INITIALIZE_PASS_END(PromotePass, "mem2reg", "Promote Memory to Register",
> false, false)
>
> bool PromotePass::runOnFunction(Function &F) {
>
> Modified: llvm/trunk/lib/VMCore/Dominators.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Dominators.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/VMCore/Dominators.cpp (original)
> +++ llvm/trunk/lib/VMCore/Dominators.cpp Tue Oct 12 14:48:12 2010
> @@ -106,7 +106,10 @@
> //===----------------------------------------------------------------------===//
>
> char DominanceFrontier::ID = 0;
> -INITIALIZE_PASS(DominanceFrontier, "domfrontier",
> +INITIALIZE_PASS_BEGIN(DominanceFrontier, "domfrontier",
> + "Dominance Frontier Construction", true, true)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_END(DominanceFrontier, "domfrontier",
> "Dominance Frontier Construction", true, true)
>
> void DominanceFrontier::verifyAnalysis() const {
>
> Modified: llvm/trunk/lib/VMCore/Verifier.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=116334&r1=116333&r2=116334&view=diff
> ==============================================================================
> --- llvm/trunk/lib/VMCore/Verifier.cpp (original)
> +++ llvm/trunk/lib/VMCore/Verifier.cpp Tue Oct 12 14:48:12 2010
> @@ -393,7 +393,10 @@
> } // End anonymous namespace
>
> char Verifier::ID = 0;
> -INITIALIZE_PASS(Verifier, "verify", "Module Verifier", false, false)
> +INITIALIZE_PASS_BEGIN(Verifier, "verify", "Module Verifier", false, false)
> +INITIALIZE_PASS_DEPENDENCY(PreVerifier)
> +INITIALIZE_PASS_DEPENDENCY(DominatorTree)
> +INITIALIZE_PASS_END(Verifier, "verify", "Module Verifier", false, false)
>
> // Assert - We know that cond should be true, if not print an error message.
> #define Assert(C, M) \
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list