llvm.org GIT mirror llvm / ce665bd
Now with fewer extraneous semicolons! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115996 91177308-0d34-0410-b5e6-96231b3b80d8 Owen Anderson 9 years ago
132 changed file(s) with 164 addition(s) and 163 deletion(s). Raw diff Collapse all Expand all
133133 PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
134134 Registry.registerPass(*PI); \
135135 } \
136 static RegisterPass passName ## _info(arg, name, cfg, analysis)
136 static RegisterPass passName ## _info(arg, name, cfg, analysis);
137137
138138
139139 template
215215 PassInfo *AI = new PassInfo(name, & agName :: ID); \
216216 Registry.registerAnalysisGroup(& agName ::ID, 0, *AI, false); \
217217 } \
218 static RegisterAnalysisGroup agName##_info (name)
218 static RegisterAnalysisGroup agName##_info (name);
219219
220220 #define INITIALIZE_AG_PASS(passName, agName, arg, name, cfg, analysis, def) \
221221 void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
227227 Registry.registerAnalysisGroup(& agName ::ID, & passName ::ID, *AI, def); \
228228 } \
229229 static RegisterPass passName ## _info(arg, name, cfg, analysis); \
230 static RegisterAnalysisGroup passName ## _ag(passName ## _info)
230 static RegisterAnalysisGroup passName ## _ag(passName ## _info);
231231
232232 //===---------------------------------------------------------------------------
233233 /// PassRegistrationListener class - This class is meant to be derived from by
3535 using namespace llvm;
3636
3737 // Register the AliasAnalysis interface, providing a nice name to refer to.
38 INITIALIZE_ANALYSIS_GROUP(AliasAnalysis, "Alias Analysis");
38 INITIALIZE_ANALYSIS_GROUP(AliasAnalysis, "Alias Analysis")
3939 char AliasAnalysis::ID = 0;
4040
4141 //===----------------------------------------------------------------------===//
112112
113113 char AliasAnalysisCounter::ID = 0;
114114 INITIALIZE_AG_PASS(AliasAnalysisCounter, AliasAnalysis, "count-aa",
115 "Count Alias Analysis Query Responses", false, true, false);
115 "Count Alias Analysis Query Responses", false, true, false)
116116
117117 ModulePass *llvm::createAliasAnalysisCounterPass() {
118118 return new AliasAnalysisCounter();
7474
7575 char AAEval::ID = 0;
7676 INITIALIZE_PASS(AAEval, "aa-eval",
77 "Exhaustive Alias Analysis Precision Evaluator", false, true);
77 "Exhaustive Alias Analysis Precision Evaluator", false, true)
7878
7979 FunctionPass *llvm::createAAEvalPass() { return new AAEval(); }
8080
129129
130130 char AliasDebugger::ID = 0;
131131 INITIALIZE_AG_PASS(AliasDebugger, AliasAnalysis, "debug-aa",
132 "AA use debugger", false, true, false);
132 "AA use debugger", false, true, false)
133133
134134 Pass *llvm::createAliasDebugger() { return new AliasDebugger(); }
135135
607607
608608 char AliasSetPrinter::ID = 0;
609609 INITIALIZE_PASS(AliasSetPrinter, "print-alias-sets",
610 "Alias Set Printer", false, true);
610 "Alias Set Printer", false, true)
189189 char NoAA::ID = 0;
190190 INITIALIZE_AG_PASS(NoAA, AliasAnalysis, "no-aa",
191191 "No Alias Analysis (always returns 'may' alias)",
192 true, true, false);
192 true, true, false)
193193
194194 ImmutablePass *llvm::createNoAAPass() { return new NoAA(); }
195195
560560 char BasicAliasAnalysis::ID = 0;
561561 INITIALIZE_AG_PASS(BasicAliasAnalysis, AliasAnalysis, "basicaa",
562562 "Basic Alias Analysis (default AA impl)",
563 false, true, true);
563 false, true, true)
564564
565565 ImmutablePass *llvm::createBasicAliasAnalysisPass() {
566566 return new BasicAliasAnalysis();
4040 }
4141
4242 char CFGViewer::ID = 0;
43 INITIALIZE_PASS(CFGViewer, "view-cfg", "View CFG of function", false, true);
43 INITIALIZE_PASS(CFGViewer, "view-cfg", "View CFG of function", false, true)
4444
4545 namespace {
4646 struct CFGOnlyViewer : public FunctionPass {
6262
6363 char CFGOnlyViewer::ID = 0;
6464 INITIALIZE_PASS(CFGOnlyViewer, "view-cfg-only",
65 "View CFG of function (with no function bodies)", false, true);
65 "View CFG of function (with no function bodies)", false, true)
6666
6767 namespace {
6868 struct CFGPrinter : public FunctionPass {
9494
9595 char CFGPrinter::ID = 0;
9696 INITIALIZE_PASS(CFGPrinter, "dot-cfg", "Print CFG of function to 'dot' file",
97 false, true);
97 false, true)
9898
9999 namespace {
100100 struct CFGOnlyPrinter : public FunctionPass {
125125 char CFGOnlyPrinter::ID = 0;
126126 INITIALIZE_PASS(CFGOnlyPrinter, "dot-cfg-only",
127127 "Print CFG of function to 'dot' file (with no function bodies)",
128 false, true);
128 false, true)
129129
130130 /// viewCFG - This function is meant for use from the debugger. You can just
131131 /// say 'call F->viewCFG()' and a ghostview window should pop up from the
5050 }
5151
5252 INITIALIZE_PASS(PrintDbgInfo, "print-dbginfo",
53 "Print debug info in human readable form", false, false);
53 "Print debug info in human readable form", false, false)
5454
5555 FunctionPass *llvm::createDbgInfoPrinterPass() { return new PrintDbgInfo(); }
5656
111111
112112 char DomViewer::ID = 0;
113113 INITIALIZE_PASS(DomViewer, "view-dom",
114 "View dominance tree of function", false, false);
114 "View dominance tree of function", false, false)
115115
116116 char DomOnlyViewer::ID = 0;
117117 INITIALIZE_PASS(DomOnlyViewer, "view-dom-only",
118118 "View dominance tree of function (with no function bodies)",
119 false, false);
119 false, false)
120120
121121 char PostDomViewer::ID = 0;
122122 INITIALIZE_PASS(PostDomViewer, "view-postdom",
123 "View postdominance tree of function", false, false);
123 "View postdominance tree of function", false, false)
124124
125125 char PostDomOnlyViewer::ID = 0;
126126 INITIALIZE_PASS(PostDomOnlyViewer, "view-postdom-only",
127127 "View postdominance tree of function "
128128 "(with no function bodies)",
129 false, false);
129 false, false)
130130
131131 namespace {
132132 struct DomPrinter
161161 char DomPrinter::ID = 0;
162162 INITIALIZE_PASS(DomPrinter, "dot-dom",
163163 "Print dominance tree of function to 'dot' file",
164 false, false);
164 false, false)
165165
166166 char DomOnlyPrinter::ID = 0;
167167 INITIALIZE_PASS(DomOnlyPrinter, "dot-dom-only",
168168 "Print dominance tree of function to 'dot' file "
169169 "(with no function bodies)",
170 false, false);
170 false, false)
171171
172172 char PostDomPrinter::ID = 0;
173173 INITIALIZE_PASS(PostDomPrinter, "dot-postdom",
174174 "Print postdominance tree of function to 'dot' file",
175 false, false);
175 false, false)
176176
177177 char PostDomOnlyPrinter::ID = 0;
178178 INITIALIZE_PASS(PostDomOnlyPrinter, "dot-postdom-only",
179179 "Print postdominance tree of function to 'dot' file "
180180 "(with no function bodies)",
181 false, false);
181 false, false)
182182
183183 // Create methods available outside of this file, to use them
184184 // "include/llvm/LinkAllPasses.h". Otherwise the pass would be deleted by
170170
171171 } //End anonymous namespace
172172
173 INITIALIZE_ANALYSIS_GROUP(CallGraph, "Call Graph");
173 INITIALIZE_ANALYSIS_GROUP(CallGraph, "Call Graph")
174174 INITIALIZE_AG_PASS(BasicCallGraph, CallGraph, "basiccg",
175 "Basic CallGraph Construction", false, true, true);
175 "Basic CallGraph Construction", false, true, true)
176176
177177 char CallGraph::ID = 0;
178178 char BasicCallGraph::ID = 0;
2323
2424 char FindUsedTypes::ID = 0;
2525 INITIALIZE_PASS(FindUsedTypes, "print-used-types",
26 "Find Used Types", false, true);
26 "Find Used Types", false, true)
2727
2828 // IncorporateType - Incorporate one type and all of its subtypes into the
2929 // collection of used types.
177177 char GlobalsModRef::ID = 0;
178178 INITIALIZE_AG_PASS(GlobalsModRef, AliasAnalysis,
179179 "globalsmodref-aa", "Simple mod/ref analysis for globals",
180 false, true, false);
180 false, true, false)
181181
182182 Pass *llvm::createGlobalsModRefPass() { return new GlobalsModRef(); }
183183
2727 using namespace llvm;
2828
2929 char IVUsers::ID = 0;
30 INITIALIZE_PASS(IVUsers, "iv-users", "Induction Variable Users", false, true);
30 INITIALIZE_PASS(IVUsers, "iv-users", "Induction Variable Users", false, true)
3131
3232 Pass *llvm::createIVUsersPass() {
3333 return new IVUsers();
6464
6565 char InstCount::ID = 0;
6666 INITIALIZE_PASS(InstCount, "instcount",
67 "Counts the various types of Instructions", false, true);
67 "Counts the various types of Instructions", false, true)
6868
6969 FunctionPass *llvm::createInstCountPass() { return new InstCount(); }
7070
1616
1717 char IntervalPartition::ID = 0;
1818 INITIALIZE_PASS(IntervalPartition, "intervals",
19 "Interval Partition Construction", true, true);
19 "Interval Partition Construction", true, true)
2020
2121 //===----------------------------------------------------------------------===//
2222 // IntervalPartition Implementation
3131
3232 char LazyValueInfo::ID = 0;
3333 INITIALIZE_PASS(LazyValueInfo, "lazy-value-info",
34 "Lazy Value Information Analysis", false, true);
34 "Lazy Value Information Analysis", false, true)
3535
3636 namespace llvm {
3737 FunctionPass *createLazyValueInfoPass() { return new LazyValueInfo(); }
2020 // Register this pass...
2121 char LibCallAliasAnalysis::ID = 0;
2222 INITIALIZE_AG_PASS(LibCallAliasAnalysis, AliasAnalysis, "libcall-aa",
23 "LibCall Alias Analysis", false, true, false);
23 "LibCall Alias Analysis", false, true, false)
2424
2525 FunctionPass *llvm::createLibCallAliasAnalysisPass(LibCallInfo *LCI) {
2626 return new LibCallAliasAnalysis(LCI);
144144 }
145145
146146 char Lint::ID = 0;
147 INITIALIZE_PASS(Lint, "lint", "Statically lint-checks LLVM IR", false, true);
147 INITIALIZE_PASS(Lint, "lint", "Statically lint-checks LLVM IR", false, true)
148148
149149 // Assert - We know that cond should be true, if not print an error message.
150150 #define Assert(C, M) \
2222
2323 char LiveValues::ID = 0;
2424 INITIALIZE_PASS(LiveValues, "live-values",
25 "Value Liveness Analysis", false, true);
25 "Value Liveness Analysis", false, true)
2626
2727 LiveValues::LiveValues() : FunctionPass(ID) {}
2828
4646 }
4747
4848 INITIALIZE_PASS(LoopDependenceAnalysis, "lda",
49 "Loop Dependence Analysis", false, true);
49 "Loop Dependence Analysis", false, true)
5050 char LoopDependenceAnalysis::ID = 0;
5151
5252 //===----------------------------------------------------------------------===//
3737 cl::desc("Verify loop info (time consuming)"));
3838
3939 char LoopInfo::ID = 0;
40 INITIALIZE_PASS(LoopInfo, "loops", "Natural Loop Information", true, true);
40 INITIALIZE_PASS(LoopInfo, "loops", "Natural Loop Information", true, true)
4141
4242 //===----------------------------------------------------------------------===//
4343 // Loop implementation
4949 }
5050
5151 char MemDepPrinter::ID = 0;
52 INITIALIZE_PASS(MemDepPrinter, "print-memdeps", "Print MemDeps of function", false, true);
52 INITIALIZE_PASS(MemDepPrinter, "print-memdeps", "Print MemDeps of function",
53 false, true)
5354
5455 FunctionPass *llvm::createMemDepPrinter() {
5556 return new MemDepPrinter();
4747
4848 // Register this pass...
4949 INITIALIZE_PASS(MemoryDependenceAnalysis, "memdep",
50 "Memory Dependence Analysis", false, true);
50 "Memory Dependence Analysis", false, true)
5151
5252 MemoryDependenceAnalysis::MemoryDependenceAnalysis()
5353 : FunctionPass(ID), PredCache(0) {
4242
4343 char ModuleDebugInfoPrinter::ID = 0;
4444 INITIALIZE_PASS(ModuleDebugInfoPrinter, "module-debuginfo",
45 "Decodes module-level debug info", false, true);
45 "Decodes module-level debug info", false, true)
4646
4747 ModulePass *llvm::createModuleDebugInfoPrinterPass() {
4848 return new ModuleDebugInfoPrinter();
2828 char PostDominatorTree::ID = 0;
2929 char PostDominanceFrontier::ID = 0;
3030 INITIALIZE_PASS(PostDominatorTree, "postdomtree",
31 "Post-Dominator Tree Construction", true, true);
31 "Post-Dominator Tree Construction", true, true)
3232
3333 bool PostDominatorTree::runOnFunction(Function &F) {
3434 DT->recalculate(F);
5353 //===----------------------------------------------------------------------===//
5454
5555 INITIALIZE_PASS(PostDominanceFrontier, "postdomfrontier",
56 "Post-Dominance Frontier Construction", true, true);
56 "Post-Dominance Frontier Construction", true, true)
5757
5858 const DominanceFrontier::DomSetType &
5959 PostDominanceFrontier::calculate(const PostDominatorTree &DT,
7272
7373 char ProfileEstimatorPass::ID = 0;
7474 INITIALIZE_AG_PASS(ProfileEstimatorPass, ProfileInfo, "profile-estimator",
75 "Estimate profiling information", false, true, false);
75 "Estimate profiling information", false, true, false)
7676
7777 namespace llvm {
7878 char &ProfileEstimatorPassID = ProfileEstimatorPass::ID;
2828 }
2929
3030 // Register the ProfileInfo interface, providing a nice name to refer to.
31 INITIALIZE_ANALYSIS_GROUP(ProfileInfo, "Profile Information");
31 INITIALIZE_ANALYSIS_GROUP(ProfileInfo, "Profile Information")
3232
3333 namespace llvm {
3434
10971097 char NoProfileInfo::ID = 0;
10981098 // Register this pass...
10991099 INITIALIZE_AG_PASS(NoProfileInfo, ProfileInfo, "no-profile",
1100 "No Profile Information", false, true, true);
1100 "No Profile Information", false, true, true)
11011101
11021102 ImmutablePass *llvm::createNoProfileInfoPass() { return new NoProfileInfo(); }
7979
8080 char LoaderPass::ID = 0;
8181 INITIALIZE_AG_PASS(LoaderPass, ProfileInfo, "profile-loader",
82 "Load profile information from llvmprof.out", false, true, false);
82 "Load profile information from llvmprof.out", false, true, false)
8383
8484 char &llvm::ProfileLoaderPassID = LoaderPass::ID;
8585
366366 }
367367
368368 INITIALIZE_PASS(ProfileVerifierPass, "profile-verifier",
369 "Verify profiling information", false, true);
369 "Verify profiling information", false, true)
370370
371371 namespace llvm {
372372 FunctionPass *createProfileVerifierPass() {
734734
735735 char RegionInfo::ID = 0;
736736 INITIALIZE_PASS(RegionInfo, "regions",
737 "Detect single entry single exit regions", true, true);
737 "Detect single entry single exit regions", true, true)
738738
739739 // Create methods available outside of this file, to use them
740740 // "include/llvm/LinkAllPasses.h". Otherwise the pass would be deleted by
141141 } //end anonymous namespace
142142
143143 INITIALIZE_PASS(RegionPrinter, "dot-regions",
144 "Print regions of function to 'dot' file", true, true);
144 "Print regions of function to 'dot' file", true, true)
145145
146146 INITIALIZE_PASS(RegionViewer, "view-regions", "View regions of function",
147 true, true);
147 true, true)
148148
149149 INITIALIZE_PASS(RegionOnlyViewer, "view-regions-only",
150150 "View regions of function (with no function bodies)",
151 true, true);
151 true, true)
152152
153153 namespace {
154154
165165 INITIALIZE_PASS(RegionOnlyPrinter, "dot-regions-only",
166166 "Print regions of function to 'dot' file "
167167 "(with no function bodies)",
168 true, true);
168 true, true)
169169
170170 FunctionPass* llvm::createRegionViewerPass() {
171171 return new RegionViewer();
103103 cl::init(100));
104104
105105 INITIALIZE_PASS(ScalarEvolution, "scalar-evolution",
106 "Scalar Evolution Analysis", false, true);
106 "Scalar Evolution Analysis", false, true)
107107 char ScalarEvolution::ID = 0;
108108
109109 //===----------------------------------------------------------------------===//
5757 // Register this pass...
5858 char ScalarEvolutionAliasAnalysis::ID = 0;
5959 INITIALIZE_AG_PASS(ScalarEvolutionAliasAnalysis, AliasAnalysis, "scev-aa",
60 "ScalarEvolution-based Alias Analysis", false, true, false);
60 "ScalarEvolution-based Alias Analysis", false, true, false)
6161
6262 FunctionPass *llvm::createScalarEvolutionAliasAnalysisPass() {
6363 return new ScalarEvolutionAliasAnalysis();
103103 // Register this pass...
104104 char TypeBasedAliasAnalysis::ID = 0;
105105 INITIALIZE_AG_PASS(TypeBasedAliasAnalysis, AliasAnalysis, "tbaa",
106 "Type-Based Alias Analysis", false, true, false);
106 "Type-Based Alias Analysis", false, true, false)
107107
108108 ImmutablePass *llvm::createTypeBasedAliasAnalysisPass() {
109109 return new TypeBasedAliasAnalysis();
2525
2626 char CalculateSpillWeights::ID = 0;
2727 INITIALIZE_PASS(CalculateSpillWeights, "calcspillweights",
28 "Calculate spill weights", false, false);
28 "Calculate spill weights", false, false)
2929
3030 void CalculateSpillWeights::getAnalysisUsage(AnalysisUsage &au) const {
3131 au.addRequired();
4444 char DeadMachineInstructionElim::ID = 0;
4545
4646 INITIALIZE_PASS(DeadMachineInstructionElim, "dead-mi-elimination",
47 "Remove dead machine instructions", false, false);
47 "Remove dead machine instructions", false, false)
4848
4949 FunctionPass *llvm::createDeadMachineInstructionElimPass() {
5050 return new DeadMachineInstructionElim();
5454 }
5555
5656 INITIALIZE_PASS(GCModuleInfo, "collector-metadata",
57 "Create Garbage Collector Module Metadata", false, false);
57 "Create Garbage Collector Module Metadata", false, false)
5858
5959 // -----------------------------------------------------------------------------
6060
244244 char IfConverter::ID = 0;
245245 }
246246
247 INITIALIZE_PASS(IfConverter, "if-converter", "If Converter", false, false);
247 INITIALIZE_PASS(IfConverter, "if-converter", "If Converter", false, false)
248248
249249 FunctionPass *llvm::createIfConverterPass() { return new IfConverter(); }
250250
5555
5656 char LiveIntervals::ID = 0;
5757 INITIALIZE_PASS(LiveIntervals, "liveintervals",
58 "Live Interval Analysis", false, false);
58 "Live Interval Analysis", false, false)
5959
6060 void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const {
6161 AU.setPreservesCFG();
2525
2626 char LiveStacks::ID = 0;
2727 INITIALIZE_PASS(LiveStacks, "livestacks",
28 "Live Stack Slot Analysis", false, false);
28 "Live Stack Slot Analysis", false, false)
2929
3030 void LiveStacks::getAnalysisUsage(AnalysisUsage &AU) const {
3131 AU.setPreservesAll();
4242
4343 char LiveVariables::ID = 0;
4444 INITIALIZE_PASS(LiveVariables, "livevars",
45 "Live Variable Analysis", false, false);
45 "Live Variable Analysis", false, false)
4646
4747
4848 void LiveVariables::getAnalysisUsage(AnalysisUsage &AU) const {
9191
9292 char MachineCSE::ID = 0;
9393 INITIALIZE_PASS(MachineCSE, "machine-cse",
94 "Machine Common Subexpression Elimination", false, false);
94 "Machine Common Subexpression Elimination", false, false)
9595
9696 FunctionPass *llvm::createMachineCSEPass() { return new MachineCSE(); }
9797
2424 char MachineDominatorTree::ID = 0;
2525
2626 INITIALIZE_PASS(MachineDominatorTree, "machinedomtree",
27 "MachineDominator Tree Construction", true, true);
27 "MachineDominator Tree Construction", true, true)
2828
2929 char &llvm::MachineDominatorsID = MachineDominatorTree::ID;
3030
189189
190190 char MachineLICM::ID = 0;
191191 INITIALIZE_PASS(MachineLICM, "machinelicm",
192 "Machine Loop Invariant Code Motion", false, false);
192 "Machine Loop Invariant Code Motion", false, false)
193193
194194 FunctionPass *llvm::createMachineLICMPass(bool PreRegAlloc) {
195195 return new MachineLICM(PreRegAlloc);
3030
3131 char MachineLoopInfo::ID = 0;
3232 INITIALIZE_PASS(MachineLoopInfo, "machine-loops",
33 "Machine Natural Loop Construction", true, true);
33 "Machine Natural Loop Construction", true, true)
3434
3535 char &llvm::MachineLoopInfoID = MachineLoopInfo::ID;
3636
2828
2929 // Handle the Pass registration stuff necessary to use TargetData's.
3030 INITIALIZE_PASS(MachineModuleInfo, "machinemoduleinfo",
31 "Machine Module Information", false, false);
31 "Machine Module Information", false, false)
3232 char MachineModuleInfo::ID = 0;
3333
3434 // Out of line virtual method.
9494
9595 char MachineSinking::ID = 0;
9696 INITIALIZE_PASS(MachineSinking, "machine-sink",
97 "Machine code sinking", false, false);
97 "Machine code sinking", false, false)
9898
9999 FunctionPass *llvm::createMachineSinkingPass() { return new MachineSinking(); }
100100
211211
212212 char MachineVerifierPass::ID = 0;
213213 INITIALIZE_PASS(MachineVerifierPass, "machineverifier",
214 "Verify generated machine code", false, false);
214 "Verify generated machine code", false, false)
215215
216216 FunctionPass *llvm::createMachineVerifierPass() {
217217 return new MachineVerifierPass();
5454
5555 char OptimizePHIs::ID = 0;
5656 INITIALIZE_PASS(OptimizePHIs, "opt-phis",
57 "Optimize machine instruction PHIs", false, false);
57 "Optimize machine instruction PHIs", false, false)
5858
5959 FunctionPass *llvm::createOptimizePHIsPass() { return new OptimizePHIs(); }
6060
3838
3939 char PHIElimination::ID = 0;
4040 INITIALIZE_PASS(PHIElimination, "phi-node-elimination",
41 "Eliminate PHI nodes for register allocation", false, false);
41 "Eliminate PHI nodes for register allocation", false, false)
4242
4343 char &llvm::PHIEliminationID = PHIElimination::ID;
4444
8484
8585 char PeepholeOptimizer::ID = 0;
8686 INITIALIZE_PASS(PeepholeOptimizer, "peephole-opts",
87 "Peephole Optimizations", false, false);
87 "Peephole Optimizations", false, false)
8888
8989 FunctionPass *llvm::createPeepholeOptimizerPass() {
9090 return new PeepholeOptimizer();
204204
205205 INITIALIZE_PASS(PreAllocSplitting, "pre-alloc-splitting",
206206 "Pre-Register Allocation Live Interval Splitting",
207 false, false);
207 false, false)
208208
209209 char &llvm::PreAllocSplittingID = PreAllocSplitting::ID;
210210
2626
2727 char ProcessImplicitDefs::ID = 0;
2828 INITIALIZE_PASS(ProcessImplicitDefs, "processimpdefs",
29 "Process Implicit Definitions.", false, false);
29 "Process Implicit Definitions.", false, false)
3030
3131 void ProcessImplicitDefs::getAnalysisUsage(AnalysisUsage &AU) const {
3232 AU.setPreservesCFG();
4444 char PEI::ID = 0;
4545
4646 INITIALIZE_PASS(PEI, "prologepilog",
47 "Prologue/Epilogue Insertion", false, false);
47 "Prologue/Epilogue Insertion", false, false)
4848
4949 STATISTIC(NumVirtualFrameRegs, "Number of virtual frame regs encountered");
5050 STATISTIC(NumScavengedRegs, "Number of frame index regs scavenged");
370370 }
371371
372372 INITIALIZE_PASS(RALinScan, "linearscan-regalloc",
373 "Linear Scan Register Allocator", false, false);
373 "Linear Scan Register Allocator", false, false)
374374
375375 void RALinScan::ComputeRelatedRegClasses() {
376376 // First pass, add all reg classes to the union, and determine at least one
2323 using namespace llvm;
2424
2525 // Register the RegisterCoalescer interface, providing a nice name to refer to.
26 INITIALIZE_ANALYSIS_GROUP(RegisterCoalescer, "Register Coalescer");
26 INITIALIZE_ANALYSIS_GROUP(RegisterCoalescer, "Register Coalescer")
2727 char RegisterCoalescer::ID = 0;
2828
2929 // RegisterCoalescer destructor: DO NOT move this to the header file
3131 char RenderMachineFunction::ID = 0;
3232 INITIALIZE_PASS(RenderMachineFunction, "rendermf",
3333 "Render machine functions (and related info) to HTML pages",
34 false, false);
34 false, false)
3535
3636 static cl::opt
3737 outputFileSuffix("rmf-file-suffix",
6565
6666 INITIALIZE_AG_PASS(SimpleRegisterCoalescing, RegisterCoalescer,
6767 "simple-register-coalescing", "Simple Register Coalescing",
68 false, false, true);
68 false, false, true)
6969
7070 char &llvm::SimpleRegisterCoalescingID = SimpleRegisterCoalescing::ID;
7171
4040
4141 char SlotIndexes::ID = 0;
4242 INITIALIZE_PASS(SlotIndexes, "slotindexes",
43 "Slot index numbering", false, false);
43 "Slot index numbering", false, false)
4444
4545 IndexListEntry* IndexListEntry::getEmptyKeyEntry() {
4646 return &*IndexListEntryEmptyKey;
2929
3030 char LoopSplitter::ID = 0;
3131 INITIALIZE_PASS(LoopSplitter, "loop-splitting",
32 "Split virtual regists across loop boundaries.", false, false);
32 "Split virtual regists across loop boundaries.", false, false)
3333
3434 namespace llvm {
3535
7171
7272 char StackProtector::ID = 0;
7373 INITIALIZE_PASS(StackProtector, "stack-protector",
74 "Insert stack protectors", false, false);
74 "Insert stack protectors", false, false)
7575
7676 FunctionPass *llvm::createStackProtectorPass(const TargetLowering *tli) {
7777 return new StackProtector(tli);
145145 char StackSlotColoring::ID = 0;
146146
147147 INITIALIZE_PASS(StackSlotColoring, "stack-slot-coloring",
148 "Stack Slot Coloring", false, false);
148 "Stack Slot Coloring", false, false)
149149
150150 FunctionPass *llvm::createStackSlotColoringPass(bool RegColor) {
151151 return new StackSlotColoring(RegColor);
150150
151151 char StrongPHIElimination::ID = 0;
152152 INITIALIZE_PASS(StrongPHIElimination, "strong-phi-node-elimination",
153 "Eliminate PHI nodes for register allocation, intelligently", false, false);
153 "Eliminate PHI nodes for register allocation, intelligently", false, false)
154154
155155 char &llvm::StrongPHIEliminationID = StrongPHIElimination::ID;
156156
159159
160160 char TwoAddressInstructionPass::ID = 0;
161161 INITIALIZE_PASS(TwoAddressInstructionPass, "twoaddressinstruction",
162 "Two-Address instruction pass", false, false);
162 "Two-Address instruction pass", false, false)
163163
164164 char &llvm::TwoAddressInstructionPassID = TwoAddressInstructionPass::ID;
165165
5151 }
5252 char UnreachableBlockElim::ID = 0;
5353 INITIALIZE_PASS(UnreachableBlockElim, "unreachableblockelim",
54 "Remove unreachable blocks from the CFG", false, false);
54 "Remove unreachable blocks from the CFG", false, false)
5555
5656 FunctionPass *llvm::createUnreachableBlockEliminationPass() {
5757 return new UnreachableBlockElim();
105105 char UnreachableMachineBlockElim::ID = 0;
106106
107107 INITIALIZE_PASS(UnreachableMachineBlockElim, "unreachable-mbb-elimination",
108 "Remove unreachable machine basic blocks", false, false);
108 "Remove unreachable machine basic blocks", false, false)
109109
110110 char &llvm::UnreachableMachineBlockElimID = UnreachableMachineBlockElim::ID;
111111
4747
4848 char VirtRegMap::ID = 0;
4949
50 INITIALIZE_PASS(VirtRegMap, "virtregmap", "Virtual Register Map", false, false);
50 INITIALIZE_PASS(VirtRegMap, "virtregmap", "Virtual Register Map", false, false)
5151
5252 bool VirtRegMap::runOnMachineFunction(MachineFunction &mf) {
5353 MRI = &mf.getRegInfo();
3333 // Handle the Pass registration stuff necessary to use TargetData's.
3434
3535 // Register the default SparcV9 implementation...
36 INITIALIZE_PASS(TargetData, "targetdata", "Target Data Layout", false, true);
36 INITIALIZE_PASS(TargetData, "targetdata", "Target Data Layout", false, true)
3737 char TargetData::ID = 0;
3838
3939 //===----------------------------------------------------------------------===//
8484
8585 char ArgPromotion::ID = 0;
8686 INITIALIZE_PASS(ArgPromotion, "argpromotion",
87 "Promote 'by reference' arguments to scalars", false, false);
87 "Promote 'by reference' arguments to scalars", false, false)
8888
8989 Pass *llvm::createArgumentPromotionPass(unsigned maxElements) {
9090 return new ArgPromotion(maxElements);
4343
4444 char ConstantMerge::ID = 0;
4545 INITIALIZE_PASS(ConstantMerge, "constmerge",
46 "Merge Duplicate Global Constants", false, false);
46 "Merge Duplicate Global Constants", false, false)
4747
4848 ModulePass *llvm::createConstantMergePass() { return new ConstantMerge(); }
4949
150150
151151
152152 char DAE::ID = 0;
153 INITIALIZE_PASS(DAE, "deadargelim", "Dead Argument Elimination", false, false);
153 INITIALIZE_PASS(DAE, "deadargelim", "Dead Argument Elimination", false, false)
154154
155155 namespace {
156156 /// DAH - DeadArgumentHacking pass - Same as dead argument elimination, but
167167 char DAH::ID = 0;
168168 INITIALIZE_PASS(DAH, "deadarghaX0r",
169169 "Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)",
170 false, false);
170 false, false)
171171
172172 /// createDeadArgEliminationPass - This pass removes arguments from functions
173173 /// which are not used by the body of the function.
4444 }
4545
4646 char DTE::ID = 0;
47 INITIALIZE_PASS(DTE, "deadtypeelim", "Dead Type Elimination", false, false);
47 INITIALIZE_PASS(DTE, "deadtypeelim", "Dead Type Elimination", false, false)
4848
4949 ModulePass *llvm::createDeadTypeEliminationPass() {
5050 return new DTE();
6969
7070 char FunctionAttrs::ID = 0;
7171 INITIALIZE_PASS(FunctionAttrs, "functionattrs",
72 "Deduce function attributes", false, false);
72 "Deduce function attributes", false, false)
7373
7474 Pass *llvm::createFunctionAttrsPass() { return new FunctionAttrs(); }
7575
5151
5252 char GlobalDCE::ID = 0;
5353 INITIALIZE_PASS(GlobalDCE, "globaldce",
54 "Dead Global Elimination", false, false);
54 "Dead Global Elimination", false, false)
5555
5656 ModulePass *llvm::createGlobalDCEPass() { return new GlobalDCE(); }
5757
7474
7575 char GlobalOpt::ID = 0;
7676 INITIALIZE_PASS(GlobalOpt, "globalopt",
77 "Global Variable Optimizer", false, false);
77 "Global Variable Optimizer", false, false)
7878
7979 ModulePass *llvm::createGlobalOptimizerPass() { return new GlobalOpt(); }
8080
4545
4646 char IPCP::ID = 0;
4747 INITIALIZE_PASS(IPCP, "ipconstprop",
48 "Interprocedural constant propagation", false, false);
48 "Interprocedural constant propagation", false, false)
4949
5050 ModulePass *llvm::createIPConstantPropagationPass() { return new IPCP(); }
5151
6161
6262 char AlwaysInliner::ID = 0;
6363 INITIALIZE_PASS(AlwaysInliner, "always-inline",
64 "Inliner for always_inline functions", false, false);
64 "Inliner for always_inline functions", false, false)
6565
6666 Pass *llvm::createAlwaysInlinerPass() { return new AlwaysInliner(); }
6767
5656
5757 char SimpleInliner::ID = 0;
5858 INITIALIZE_PASS(SimpleInliner, "inline",
59 "Function Integration/Inlining", false, false);
59 "Function Integration/Inlining", false, false)
6060
6161 Pass *llvm::createFunctionInliningPass() { return new SimpleInliner(); }
6262
6363
6464 char InternalizePass::ID = 0;
6565 INITIALIZE_PASS(InternalizePass, "internalize",
66 "Internalize Global Symbols", false, false);
66 "Internalize Global Symbols", false, false)
6767
6868 InternalizePass::InternalizePass(bool AllButMain)
6969 : ModulePass(ID), AllButMain(AllButMain){
5050
5151 char LoopExtractor::ID = 0;
5252 INITIALIZE_PASS(LoopExtractor, "loop-extract",
53 "Extract loops into new functions", false, false);
53 "Extract loops into new functions", false, false)
5454
5555 namespace {
5656 /// SingleLoopExtractor - For bugpoint.
6262
6363 char SingleLoopExtractor::ID = 0;
6464 INITIALIZE_PASS(SingleLoopExtractor, "loop-extract-single",
65 "Extract at most one loop into a new function", false, false);
65 "Extract at most one loop into a new function", false, false)
6666
6767 // createLoopExtractorPass - This pass extracts all natural loops from the
6868 // program into a function if it can.
158158 char BlockExtractorPass::ID = 0;
159159 INITIALIZE_PASS(BlockExtractorPass, "extract-blocks",
160160 "Extract Basic Blocks From Module (for bugpoint use)",
161 false, false);
161 false, false)
162162
163163 // createBlockExtractorPass - This pass extracts all blocks (except those
164164 // specified in the argument list) from the functions in the module.
121121 } // end anonymous namespace
122122
123123 char LowerSetJmp::ID = 0;
124 INITIALIZE_PASS(LowerSetJmp, "lowersetjmp", "Lower Set Jump", false, false);
124 INITIALIZE_PASS(LowerSetJmp, "lowersetjmp", "Lower Set Jump", false, false)
125125
126126 // run - Run the transformation on the program. We grab the function
127127 // prototypes for longjmp and setjmp. If they are used in the program,
177177 } // end anonymous namespace
178178
179179 char MergeFunctions::ID = 0;
180 INITIALIZE_PASS(MergeFunctions, "mergefunc", "Merge Functions", false, false);
180 INITIALIZE_PASS(MergeFunctions, "mergefunc", "Merge Functions", false, false)
181181
182182 ModulePass *llvm::createMergeFunctionsPass() {
183183 return new MergeFunctions();
4040
4141 char PartialInliner::ID = 0;
4242 INITIALIZE_PASS(PartialInliner, "partial-inliner",
43 "Partial Inliner", false, false);
43 "Partial Inliner", false, false)
4444
4545 ModulePass* llvm::createPartialInliningPass() { return new PartialInliner(); }
4646
5656
5757 char PartSpec::ID = 0;
5858 INITIALIZE_PASS(PartSpec, "partialspecialization",
59 "Partial Specialization", false, false);
59 "Partial Specialization", false, false)
6060
6161 // Specialize F by replacing the arguments (keys) in replacements with the
6262 // constants (values). Replace all calls to F with those constants with
4848
4949 char PruneEH::ID = 0;
5050 INITIALIZE_PASS(PruneEH, "prune-eh",
51 "Remove unused exception handling info", false, false);
51 "Remove unused exception handling info", false, false)
5252
5353 Pass *llvm::createPruneEHPass() { return new PruneEH(); }
5454
3636
3737 char StripDeadPrototypesPass::ID = 0;
3838 INITIALIZE_PASS(StripDeadPrototypesPass, "strip-dead-prototypes",
39 "Strip Unused Function Prototypes", false, false);
39 "Strip Unused Function Prototypes", false, false)
4040
4141 bool StripDeadPrototypesPass::runOnModule(Module &M) {
4242 bool MadeChange = false;
8989
9090 char StripSymbols::ID = 0;
9191 INITIALIZE_PASS(StripSymbols, "strip",
92 "Strip all symbols from a module", false, false);
92 "Strip all symbols from a module", false, false)
9393
9494 ModulePass *llvm::createStripSymbolsPass(bool OnlyDebugInfo) {
9595 return new StripSymbols(OnlyDebugInfo);
9898 char StripNonDebugSymbols::ID = 0;
9999 INITIALIZE_PASS(StripNonDebugSymbols, "strip-nondebug",
100100 "Strip all symbols, except dbg symbols, from a module",
101 false, false);
101 false, false)
102102
103103 ModulePass *llvm::createStripNonDebugSymbolsPass() {
104104 return new StripNonDebugSymbols();
106106
107107 char StripDebugDeclare::ID = 0;
108108 INITIALIZE_PASS(StripDebugDeclare, "strip-debug-declare",
109 "Strip all llvm.dbg.declare intrinsics", false, false);
109 "Strip all llvm.dbg.declare intrinsics", false, false)
110110
111111 ModulePass *llvm::createStripDebugDeclarePass() {
112112 return new StripDebugDeclare();
114114
115115 char StripDeadDebugInfo::ID = 0;
116116 INITIALIZE_PASS(StripDeadDebugInfo, "strip-dead-debug-info",
117 "Strip debug info for unused symbols", false, false);
117 "Strip debug info for unused symbols", false, false)
118118
119119 ModulePass *llvm::createStripDeadDebugInfoPass() {
120120 return new StripDeadDebugInfo();
6161
6262 char SRETPromotion::ID = 0;
6363 INITIALIZE_PASS(SRETPromotion, "sretpromotion",
64 "Promote sret arguments to multiple ret values", false, false);
64 "Promote sret arguments to multiple ret values", false, false)
6565
6666 Pass *llvm::createStructRetPromotionPass() {
6767 return new SRETPromotion();
6969
7070 char InstCombiner::ID = 0;
7171 INITIALIZE_PASS(InstCombiner, "instcombine",
72 "Combine redundant instructions", false, false);
72 "Combine redundant instructions", false, false)
7373
7474 void InstCombiner::getAnalysisUsage(AnalysisUsage &AU) const {
7575 AU.addPreservedID(LCSSAID);
4343
4444 char EdgeProfiler::ID = 0;
4545 INITIALIZE_PASS(EdgeProfiler, "insert-edge-profiling",
46 "Insert instrumentation for edge profiling", false, false);
46 "Insert instrumentation for edge profiling", false, false)
4747
4848 ModulePass *llvm::createEdgeProfilerPass() { return new EdgeProfiler(); }
4949
5151 char OptimalEdgeProfiler::ID = 0;
5252 INITIALIZE_PASS(OptimalEdgeProfiler, "insert-optimal-edge-profiling",
5353 "Insert optimal instrumentation for edge profiling",
54 false, false);
54 false, false)
5555
5656 ModulePass *llvm::createOptimalEdgeProfilerPass() {
5757 return new OptimalEdgeProfiler();
4444 }
4545
4646 char ADCE::ID = 0;
47 INITIALIZE_PASS(ADCE, "adce", "Aggressive Dead Code Elimination", false, false);
47 INITIALIZE_PASS(ADCE, "adce", "Aggressive Dead Code Elimination", false, false)
4848
4949 bool ADCE::runOnFunction(Function& F) {
5050 SmallPtrSet alive;
7474
7575 char BlockPlacement::ID = 0;
7676 INITIALIZE_PASS(BlockPlacement, "block-placement",
77 "Profile Guided Basic Block Placement", false, false);
77 "Profile Guided Basic Block Placement", false, false)
7878
7979 FunctionPass *llvm::createBlockPlacementPass() { return new BlockPlacement(); }
8080
9191
9292 char CodeGenPrepare::ID = 0;
9393 INITIALIZE_PASS(CodeGenPrepare, "codegenprepare",
94 "Optimize for code generation", false, false);
94 "Optimize for code generation", false, false)
9595
9696 FunctionPass *llvm::createCodeGenPreparePass(const TargetLowering *TLI) {
9797 return new CodeGenPrepare(TLI);
4545
4646 char ConstantPropagation::ID = 0;
4747 INITIALIZE_PASS(ConstantPropagation, "constprop",
48 "Simple constant propagation", false, false);
48 "Simple constant propagation", false, false)
4949
5050 FunctionPass *llvm::createConstantPropagationPass() {
5151 return new ConstantPropagation();
5050
5151 char CorrelatedValuePropagation::ID = 0;
5252 INITIALIZE_PASS(CorrelatedValuePropagation, "correlated-propagation",
53 "Value Propagation", false, false);
53 "Value Propagation", false, false)
5454
5555 // Public interface to the Value Propagation pass
5656 Pass *llvm::createCorrelatedValuePropagationPass() {
5656
5757 char DeadInstElimination::ID = 0;
5858 INITIALIZE_PASS(DeadInstElimination, "die",
59 "Dead Instruction Elimination", false, false);
59 "Dead Instruction Elimination", false, false)
6060
6161 Pass *llvm::createDeadInstEliminationPass() {
6262 return new DeadInstElimination();
8080 }
8181
8282 char DCE::ID = 0;
83 INITIALIZE_PASS(DCE, "dce", "Dead Code Elimination", false, false);
83 INITIALIZE_PASS(DCE, "dce", "Dead Code Elimination", false, false)
8484
8585 bool DCE::runOnFunction(Function &F) {
8686 // Start out with all of the instructions in the worklist...
8181 }
8282
8383 char DSE::ID = 0;
84 INITIALIZE_PASS(DSE, "dse", "Dead Store Elimination", false, false);
84 INITIALIZE_PASS(DSE, "dse", "Dead Store Elimination", false, false)
8585
8686 FunctionPass *llvm::createDeadStoreEliminationPass() { return new DSE(); }
8787
3232
3333 char GEPSplitter::ID = 0;
3434 INITIALIZE_PASS(GEPSplitter, "split-geps",
35 "split complex GEPs into simple GEPs", false, false);
35 "split complex GEPs into simple GEPs", false, false)
3636
3737 FunctionPass *llvm::createGEPSplitterPass() {
3838 return new GEPSplitter();
712712 return new GVN(NoLoads);
713713 }
714714
715 INITIALIZE_PASS(GVN, "gvn", "Global Value Numbering", false, false);
715 INITIALIZE_PASS(GVN, "gvn", "Global Value Numbering", false, false)
716716
717717 void GVN::dump(DenseMap& d) {
718718 errs() << "{\n";
117117
118118 char IndVarSimplify::ID = 0;
119119 INITIALIZE_PASS(IndVarSimplify, "indvars",
120 "Canonicalize Induction Variables", false, false);
120 "Canonicalize Induction Variables", false, false)
121121
122122 Pass *llvm::createIndVarSimplifyPass() {
123123 return new IndVarSimplify();
121121
122122 char JumpThreading::ID = 0;
123123 INITIALIZE_PASS(JumpThreading, "jump-threading",
124 "Jump Threading", false, false);
124 "Jump Threading", false, false)
125125
126126 // Public interface to the Jump Threading pass
127127 FunctionPass *llvm::createJumpThreadingPass() { return new JumpThreading(); }
199199 }
200200
201201 char LICM::ID = 0;
202 INITIALIZE_PASS(LICM, "licm", "Loop Invariant Code Motion", false, false);
202 INITIALIZE_PASS(LICM, "licm", "Loop Invariant Code Motion", false, false)
203203
204204 Pass *llvm::createLICMPass() { return new LICM(); }
205205
5555
5656 char LoopDeletion::ID = 0;
5757 INITIALIZE_PASS(LoopDeletion, "loop-deletion",
58 "Delete dead loops", false, false);
58 "Delete dead loops", false, false)
5959
6060 Pass* llvm::createLoopDeletionPass() {
6161 return new LoopDeletion();
197197
198198 char LoopIndexSplit::ID = 0;
199199 INITIALIZE_PASS(LoopIndexSplit, "loop-index-split",
200 "Index Split Loops", false, false);
200 "Index Split Loops", false, false)
201201
202202 Pass *llvm::createLoopIndexSplitPass() {
203203 return new LoopIndexSplit();
7878 }
7979
8080 char LoopRotate::ID = 0;
81 INITIALIZE_PASS(LoopRotate, "loop-rotate", "Rotate Loops", false, false);
81 INITIALIZE_PASS(LoopRotate, "loop-rotate", "Rotate Loops", false, false)
8282
8383 Pass *llvm::createLoopRotatePass() { return new LoopRotate(); }
8484
37903790
37913791 char LoopStrengthReduce::ID = 0;
37923792 INITIALIZE_PASS(LoopStrengthReduce, "loop-reduce",
3793 "Loop Strength Reduction", false, false);
3793 "Loop Strength Reduction", false, false)
37943794
37953795 Pass *llvm::createLoopStrengthReducePass(const TargetLowering *TLI) {
37963796 return new LoopStrengthReduce(TLI);
7878 }
7979
8080 char LoopUnroll::ID = 0;
81 INITIALIZE_PASS(LoopUnroll, "loop-unroll", "Unroll loops", false, false);
81 INITIALIZE_PASS(LoopUnroll, "loop-unroll", "Unroll loops", false, false)
8282
8383 Pass *llvm::createLoopUnrollPass() { return new LoopUnroll(); }
8484
157157 };
158158 }
159159 char LoopUnswitch::ID = 0;
160 INITIALIZE_PASS(LoopUnswitch, "loop-unswitch", "Unswitch loops", false, false);
160 INITIALIZE_PASS(LoopUnswitch, "loop-unswitch", "Unswitch loops", false, false)
161161
162162 Pass *llvm::createLoopUnswitchPass(bool Os) {
163163 return new LoopUnswitch(Os);
131131 char LowerAtomic::ID = 0;
132132 INITIALIZE_PASS(LowerAtomic, "loweratomic",
133133 "Lower atomic intrinsics to non-atomic form",
134 false, false);
134 false, false)
135135
136136 Pass *llvm::createLowerAtomicPass() { return new LowerAtomic(); }
330330 // createMemCpyOptPass - The public interface to this file...
331331 FunctionPass *llvm::createMemCpyOptPass() { return new MemCpyOpt(); }
332332
333 INITIALIZE_PASS(MemCpyOpt, "memcpyopt", "MemCpy Optimization", false, false);
333 INITIALIZE_PASS(MemCpyOpt, "memcpyopt", "MemCpy Optimization", false, false)
334334
335335
336336
103103
104104 char Reassociate::ID = 0;
105105 INITIALIZE_PASS(Reassociate, "reassociate",
106 "Reassociate expressions", false, false);
106 "Reassociate expressions", false, false)
107107
108108 // Public interface to the Reassociate pass
109109 FunctionPass *llvm::createReassociatePass() { return new Reassociate(); }
5959
6060 char RegToMem::ID = 0;
6161 INITIALIZE_PASS(RegToMem, "reg2mem", "Demote all values to stack slots",
62 false, false);
62 false, false)
6363
6464
6565 bool RegToMem::runOnFunction(Function &F) {
15991599
16001600 char SCCP::ID = 0;
16011601 INITIALIZE_PASS(SCCP, "sccp",
1602 "Sparse Conditional Constant Propagation", false, false);
1602 "Sparse Conditional Constant Propagation", false, false)
16031603
16041604 // createSCCPPass - This is the public interface to this file.
16051605 FunctionPass *llvm::createSCCPPass() {
17081708 char IPSCCP::ID = 0;
17091709 INITIALIZE_PASS(IPSCCP, "ipsccp",
17101710 "Interprocedural Sparse Conditional Constant Propagation",
1711 false, false);
1711 false, false)
17121712
17131713 // createIPSCCPPass - This is the public interface to this file.
17141714 ModulePass *llvm::createIPSCCPPass() {
135135
136136 char SROA::ID = 0;
137137 INITIALIZE_PASS(SROA, "scalarrepl",
138 "Scalar Replacement of Aggregates", false, false);
138 "Scalar Replacement of Aggregates", false, false)
139139
140140 // Public interface to the ScalarReplAggregates pass
141141 FunctionPass *llvm::createScalarReplAggregatesPass(signed int Threshold) {
4949
5050 char CFGSimplifyPass::ID = 0;
5151 INITIALIZE_PASS(CFGSimplifyPass, "simplifycfg",
52 "Simplify the CFG", false, false);
52 "Simplify the CFG", false, false)
5353
5454 // Public interface to the CFGSimplification pass
5555 FunctionPass *llvm::createCFGSimplificationPass() {
4646 } // end anonymous namespace.
4747
4848 INITIALIZE_PASS(SimplifyHalfPowrLibCalls, "simplify-libcalls-halfpowr",
49 "Simplify half_powr library calls", false, false);
49 "Simplify half_powr library calls", false, false)
5050
5151 // Public interface to the Simplify HalfPowr LibCalls pass.
5252 FunctionPass *llvm::createSimplifyHalfPowrLibCallsPass() {
13911391 } // end anonymous namespace.
13921392
13931393 INITIALIZE_PASS(SimplifyLibCalls, "simplify-libcalls",
1394 "Simplify well-known library calls", false, false);
1394 "Simplify well-known library calls", false, false)
13951395
13961396 // Public interface to the Simplify LibCalls pass.
13971397 FunctionPass *llvm::createSimplifyLibCallsPass() {
5555 } // end anonymous namespace
5656
5757 char Sinking::ID = 0;
58 INITIALIZE_PASS(Sinking, "sink", "Code sinking", false, false);
58 INITIALIZE_PASS(Sinking, "sink", "Code sinking", false, false)
5959
6060 FunctionPass *llvm::createSinkingPass() { return new Sinking(); }
6161
5858 }
5959
6060 char TailDup::ID = 0;
61 INITIALIZE_PASS(TailDup, "tailduplicate", "Tail Duplication", false, false);
61 INITIALIZE_PASS(TailDup, "tailduplicate", "Tail Duplication", false, false)
6262
6363 // Public interface to the Tail Duplication pass
6464 FunctionPass *llvm::createTailDuplicationPass() { return new TailDup(); }
8787
8888 char TailCallElim::ID = 0;
8989 INITIALIZE_PASS(TailCallElim, "tailcallelim",
90 "Tail Call Elimination", false, false);
90 "Tail Call Elimination", false, false)
9191
9292 // Public interface to the TailCallElimination pass
9393 FunctionPass *llvm::createTailCallEliminationPass() {
5353
5454 char BreakCriticalEdges::ID = 0;
5555 INITIALIZE_PASS(BreakCriticalEdges, "break-crit-edges",
56 "Break critical edges in CFG", false, false);
56 "Break critical edges in CFG", false, false)
5757
5858 // Publically exposed interface to pass...
5959 char &llvm::BreakCriticalEdgesID = BreakCriticalEdges::ID;
5050 }
5151
5252 INITIALIZE_PASS(InstNamer, "instnamer",
53 "Assign names to anonymous instructions", false, false);
53 "Assign names to anonymous instructions", false, false)
5454 char &llvm::InstructionNamerID = InstNamer::ID;
5555 //===----------------------------------------------------------------------===//
5656 //
8989 }
9090
9191 char LCSSA::ID = 0;
92 INITIALIZE_PASS(LCSSA, "lcssa", "Loop-Closed SSA Form Pass", false, false);
92 INITIALIZE_PASS(LCSSA, "lcssa", "Loop-Closed SSA Form Pass", false, false)
9393
9494 Pass *llvm::createLCSSAPass() { return new LCSSA(); }
9595 char &llvm::LCSSAID = LCSSA::ID;
107107
108108 char LoopSimplify::ID = 0;
109109 INITIALIZE_PASS(LoopSimplify, "loopsimplify",
110 "Canonicalize natural loops", true, false);
110 "Canonicalize natural loops", true, false)
111111
112112 // Publically exposed interface to pass...
113113 char &llvm::LoopSimplifyID = LoopSimplify::ID;
101101 char LowerInvoke::ID = 0;
102102 INITIALIZE_PASS(LowerInvoke, "lowerinvoke",
103103 "Lower invoke and unwind, for unwindless code generators",
104 false, false);
104 false, false)
105105
106106 char &llvm::LowerInvokePassID = LowerInvoke::ID;
107107
7979
8080 char LowerSwitch::ID = 0;
8181 INITIALIZE_PASS(LowerSwitch, "lowerswitch",
82 "Lower SwitchInst's to branches", false, false);
82 "Lower SwitchInst's to branches", false, false)
8383
8484 // Publically exposed interface to pass...
8585 char &llvm::LowerSwitchID = LowerSwitch::ID;
4949
5050 char PromotePass::ID = 0;
5151 INITIALIZE_PASS(PromotePass, "mem2reg", "Promote Memory to Register",
52 false, false);
52 false, false)
5353
5454 bool PromotePass::runOnFunction(Function &F) {
5555 std::vector Allocas;
2424
2525 char UnifyFunctionExitNodes::ID = 0;
2626 INITIALIZE_PASS(UnifyFunctionExitNodes, "mergereturn",
27 "Unify function exit nodes", false, false);
27 "Unify function exit nodes", false, false)
2828
2929 Pass *llvm::createUnifyFunctionExitNodesPass() {
3030 return new UnifyFunctionExitNodes();
5252
5353 char DominatorTree::ID = 0;
5454 INITIALIZE_PASS(DominatorTree, "domtree",
55 "Dominator Tree Construction", true, true);
55 "Dominator Tree Construction", true, true)
5656
5757 bool DominatorTree::runOnFunction(Function &F) {
5858 DT->recalculate(F);
106106
107107 char DominanceFrontier::ID = 0;
108108 INITIALIZE_PASS(DominanceFrontier, "domfrontier",
109 "Dominance Frontier Construction", true, true);
109 "Dominance Frontier Construction", true, true)
110110
111111 void DominanceFrontier::verifyAnalysis() const {
112112 if (!VerifyDomInfo) return;
7777
7878 char PrintModulePass::ID = 0;
7979 INITIALIZE_PASS(PrintModulePass, "print-module",
80 "Print module to stderr", false, false);
80 "Print module to stderr", false, false)
8181 char PrintFunctionPass::ID = 0;
8282 INITIALIZE_PASS(PrintFunctionPass, "print-function",
83 "Print function to stderr", false, false);
83 "Print function to stderr", false, false)
8484
8585 /// createPrintModulePass - Create and return a pass that writes the
8686 /// module to the specified raw_ostream.
102102
103103 char PreVerifier::ID = 0;
104104 INITIALIZE_PASS(PreVerifier, "preverify", "Preliminary module verification",
105 false, false);
105 false, false)
106106 char &PreVerifyID = PreVerifier::ID;
107107
108108 namespace {
392392 } // End anonymous namespace
393393
394394 char Verifier::ID = 0;
395 INITIALIZE_PASS(Verifier, "verify", "Module Verifier", false, false);
395 INITIALIZE_PASS(Verifier, "verify", "Module Verifier", false, false)
396396
397397 // Assert - We know that cond should be true, if not print an error message.
398398 #define Assert(C, M) \