]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Passes/PassRegistry.def
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / lib / Passes / PassRegistry.def
1 //===- PassRegistry.def - Registry of passes --------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file is used as the registry of passes that are part of the core LLVM
11 // libraries. This file describes both transformation passes and analyses
12 // Analyses are registered while transformation passes have names registered
13 // that can be used when providing a textual pass pipeline.
14 //
15 //===----------------------------------------------------------------------===//
16
17 // NOTE: NO INCLUDE GUARD DESIRED!
18
19 #ifndef MODULE_ANALYSIS
20 #define MODULE_ANALYSIS(NAME, CREATE_PASS)
21 #endif
22 MODULE_ANALYSIS("callgraph", CallGraphAnalysis())
23 MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis())
24 MODULE_ANALYSIS("module-summary", ModuleSummaryIndexAnalysis())
25 MODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis())
26 MODULE_ANALYSIS("profile-summary", ProfileSummaryAnalysis())
27 MODULE_ANALYSIS("stack-safety", StackSafetyGlobalAnalysis())
28 MODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
29 MODULE_ANALYSIS("verify", VerifierAnalysis())
30 MODULE_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
31
32 #ifndef MODULE_ALIAS_ANALYSIS
33 #define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS)                               \
34   MODULE_ANALYSIS(NAME, CREATE_PASS)
35 #endif
36 MODULE_ALIAS_ANALYSIS("globals-aa", GlobalsAA())
37 #undef MODULE_ALIAS_ANALYSIS
38 #undef MODULE_ANALYSIS
39
40 #ifndef MODULE_PASS
41 #define MODULE_PASS(NAME, CREATE_PASS)
42 #endif
43 MODULE_PASS("always-inline", AlwaysInlinerPass())
44 MODULE_PASS("called-value-propagation", CalledValuePropagationPass())
45 MODULE_PASS("canonicalize-aliases", CanonicalizeAliasesPass())
46 MODULE_PASS("cg-profile", CGProfilePass())
47 MODULE_PASS("constmerge", ConstantMergePass())
48 MODULE_PASS("cross-dso-cfi", CrossDSOCFIPass())
49 MODULE_PASS("deadargelim", DeadArgumentEliminationPass())
50 MODULE_PASS("elim-avail-extern", EliminateAvailableExternallyPass())
51 MODULE_PASS("forceattrs", ForceFunctionAttrsPass())
52 MODULE_PASS("function-import", FunctionImportPass())
53 MODULE_PASS("globaldce", GlobalDCEPass())
54 MODULE_PASS("globalopt", GlobalOptPass())
55 MODULE_PASS("globalsplit", GlobalSplitPass())
56 MODULE_PASS("hotcoldsplit", HotColdSplittingPass())
57 MODULE_PASS("inferattrs", InferFunctionAttrsPass())
58 MODULE_PASS("insert-gcov-profiling", GCOVProfilerPass())
59 MODULE_PASS("instrprof", InstrProfiling())
60 MODULE_PASS("internalize", InternalizePass())
61 MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass())
62 MODULE_PASS("ipsccp", IPSCCPPass())
63 MODULE_PASS("lowertypetests", LowerTypeTestsPass(nullptr, nullptr))
64 MODULE_PASS("name-anon-globals", NameAnonGlobalPass())
65 MODULE_PASS("no-op-module", NoOpModulePass())
66 MODULE_PASS("partial-inliner", PartialInlinerPass())
67 MODULE_PASS("pgo-icall-prom", PGOIndirectCallPromotion())
68 MODULE_PASS("pgo-instr-gen", PGOInstrumentationGen())
69 MODULE_PASS("pgo-instr-use", PGOInstrumentationUse())
70 MODULE_PASS("pre-isel-intrinsic-lowering", PreISelIntrinsicLoweringPass())
71 MODULE_PASS("print-profile-summary", ProfileSummaryPrinterPass(dbgs()))
72 MODULE_PASS("print-callgraph", CallGraphPrinterPass(dbgs()))
73 MODULE_PASS("print", PrintModulePass(dbgs()))
74 MODULE_PASS("print-lcg", LazyCallGraphPrinterPass(dbgs()))
75 MODULE_PASS("print-lcg-dot", LazyCallGraphDOTPrinterPass(dbgs()))
76 MODULE_PASS("print-stack-safety", StackSafetyGlobalPrinterPass(dbgs()))
77 MODULE_PASS("rewrite-statepoints-for-gc", RewriteStatepointsForGC())
78 MODULE_PASS("rewrite-symbols", RewriteSymbolPass())
79 MODULE_PASS("rpo-functionattrs", ReversePostOrderFunctionAttrsPass())
80 MODULE_PASS("sample-profile", SampleProfileLoaderPass())
81 MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())
82 MODULE_PASS("synthetic-counts-propagation", SyntheticCountsPropagation())
83 MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass(nullptr, nullptr))
84 MODULE_PASS("verify", VerifierPass())
85 #undef MODULE_PASS
86
87 #ifndef CGSCC_ANALYSIS
88 #define CGSCC_ANALYSIS(NAME, CREATE_PASS)
89 #endif
90 CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
91 CGSCC_ANALYSIS("fam-proxy", FunctionAnalysisManagerCGSCCProxy())
92 CGSCC_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
93 #undef CGSCC_ANALYSIS
94
95 #ifndef CGSCC_PASS
96 #define CGSCC_PASS(NAME, CREATE_PASS)
97 #endif
98 CGSCC_PASS("argpromotion", ArgumentPromotionPass())
99 CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass())
100 CGSCC_PASS("function-attrs", PostOrderFunctionAttrsPass())
101 CGSCC_PASS("inline", InlinerPass())
102 CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass())
103 #undef CGSCC_PASS
104
105 #ifndef FUNCTION_ANALYSIS
106 #define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
107 #endif
108 FUNCTION_ANALYSIS("aa", AAManager())
109 FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis())
110 FUNCTION_ANALYSIS("block-freq", BlockFrequencyAnalysis())
111 FUNCTION_ANALYSIS("branch-prob", BranchProbabilityAnalysis())
112 FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis())
113 FUNCTION_ANALYSIS("postdomtree", PostDominatorTreeAnalysis())
114 FUNCTION_ANALYSIS("demanded-bits", DemandedBitsAnalysis())
115 FUNCTION_ANALYSIS("domfrontier", DominanceFrontierAnalysis())
116 FUNCTION_ANALYSIS("loops", LoopAnalysis())
117 FUNCTION_ANALYSIS("lazy-value-info", LazyValueAnalysis())
118 FUNCTION_ANALYSIS("da", DependenceAnalysis())
119 FUNCTION_ANALYSIS("memdep", MemoryDependenceAnalysis())
120 FUNCTION_ANALYSIS("memoryssa", MemorySSAAnalysis())
121 FUNCTION_ANALYSIS("phi-values", PhiValuesAnalysis())
122 FUNCTION_ANALYSIS("regions", RegionInfoAnalysis())
123 FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())
124 FUNCTION_ANALYSIS("opt-remark-emit", OptimizationRemarkEmitterAnalysis())
125 FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis())
126 FUNCTION_ANALYSIS("stack-safety-local", StackSafetyAnalysis())
127 FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
128 FUNCTION_ANALYSIS("targetir",
129                   TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
130 FUNCTION_ANALYSIS("verify", VerifierAnalysis())
131 FUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
132
133 #ifndef FUNCTION_ALIAS_ANALYSIS
134 #define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS)                             \
135   FUNCTION_ANALYSIS(NAME, CREATE_PASS)
136 #endif
137 FUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA())
138 FUNCTION_ALIAS_ANALYSIS("cfl-anders-aa", CFLAndersAA())
139 FUNCTION_ALIAS_ANALYSIS("cfl-steens-aa", CFLSteensAA())
140 FUNCTION_ALIAS_ANALYSIS("scev-aa", SCEVAA())
141 FUNCTION_ALIAS_ANALYSIS("scoped-noalias-aa", ScopedNoAliasAA())
142 FUNCTION_ALIAS_ANALYSIS("type-based-aa", TypeBasedAA())
143 #undef FUNCTION_ALIAS_ANALYSIS
144 #undef FUNCTION_ANALYSIS
145
146 #ifndef FUNCTION_PASS
147 #define FUNCTION_PASS(NAME, CREATE_PASS)
148 #endif
149 FUNCTION_PASS("aa-eval", AAEvaluator())
150 FUNCTION_PASS("adce", ADCEPass())
151 FUNCTION_PASS("add-discriminators", AddDiscriminatorsPass())
152 FUNCTION_PASS("aggressive-instcombine", AggressiveInstCombinePass())
153 FUNCTION_PASS("alignment-from-assumptions", AlignmentFromAssumptionsPass())
154 FUNCTION_PASS("bdce", BDCEPass())
155 FUNCTION_PASS("bounds-checking", BoundsCheckingPass())
156 FUNCTION_PASS("break-crit-edges", BreakCriticalEdgesPass())
157 FUNCTION_PASS("callsite-splitting", CallSiteSplittingPass())
158 FUNCTION_PASS("consthoist", ConstantHoistingPass())
159 FUNCTION_PASS("chr", ControlHeightReductionPass())
160 FUNCTION_PASS("correlated-propagation", CorrelatedValuePropagationPass())
161 FUNCTION_PASS("dce", DCEPass())
162 FUNCTION_PASS("div-rem-pairs", DivRemPairsPass())
163 FUNCTION_PASS("dse", DSEPass())
164 FUNCTION_PASS("dot-cfg", CFGPrinterPass())
165 FUNCTION_PASS("dot-cfg-only", CFGOnlyPrinterPass())
166 FUNCTION_PASS("early-cse", EarlyCSEPass(/*UseMemorySSA=*/false))
167 FUNCTION_PASS("early-cse-memssa", EarlyCSEPass(/*UseMemorySSA=*/true))
168 FUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/false))
169 FUNCTION_PASS("make-guards-explicit", MakeGuardsExplicitPass())
170 FUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/true))
171 FUNCTION_PASS("gvn-hoist", GVNHoistPass())
172 FUNCTION_PASS("instcombine", InstCombinePass())
173 FUNCTION_PASS("instsimplify", InstSimplifyPass())
174 FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())
175 FUNCTION_PASS("float2int", Float2IntPass())
176 FUNCTION_PASS("no-op-function", NoOpFunctionPass())
177 FUNCTION_PASS("libcalls-shrinkwrap", LibCallsShrinkWrapPass())
178 FUNCTION_PASS("loweratomic", LowerAtomicPass())
179 FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
180 FUNCTION_PASS("lower-guard-intrinsic", LowerGuardIntrinsicPass())
181 FUNCTION_PASS("guard-widening", GuardWideningPass())
182 FUNCTION_PASS("gvn", GVN())
183 FUNCTION_PASS("load-store-vectorizer", LoadStoreVectorizerPass())
184 FUNCTION_PASS("loop-simplify", LoopSimplifyPass())
185 FUNCTION_PASS("loop-sink", LoopSinkPass())
186 FUNCTION_PASS("lowerinvoke", LowerInvokePass())
187 FUNCTION_PASS("mem2reg", PromotePass())
188 FUNCTION_PASS("memcpyopt", MemCpyOptPass())
189 FUNCTION_PASS("mldst-motion", MergedLoadStoreMotionPass())
190 FUNCTION_PASS("nary-reassociate", NaryReassociatePass())
191 FUNCTION_PASS("newgvn", NewGVNPass())
192 FUNCTION_PASS("jump-threading", JumpThreadingPass())
193 FUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass())
194 FUNCTION_PASS("lcssa", LCSSAPass())
195 FUNCTION_PASS("loop-data-prefetch", LoopDataPrefetchPass())
196 FUNCTION_PASS("loop-load-elim", LoopLoadEliminationPass())
197 FUNCTION_PASS("loop-distribute", LoopDistributePass())
198 FUNCTION_PASS("loop-vectorize", LoopVectorizePass())
199 FUNCTION_PASS("pgo-memop-opt", PGOMemOPSizeOpt())
200 FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
201 FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs()))
202 FUNCTION_PASS("print<block-freq>", BlockFrequencyPrinterPass(dbgs()))
203 FUNCTION_PASS("print<branch-prob>", BranchProbabilityPrinterPass(dbgs()))
204 FUNCTION_PASS("print<da>", DependenceAnalysisPrinterPass(dbgs()))
205 FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs()))
206 FUNCTION_PASS("print<postdomtree>", PostDominatorTreePrinterPass(dbgs()))
207 FUNCTION_PASS("print<demanded-bits>", DemandedBitsPrinterPass(dbgs()))
208 FUNCTION_PASS("print<domfrontier>", DominanceFrontierPrinterPass(dbgs()))
209 FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs()))
210 FUNCTION_PASS("print<memoryssa>", MemorySSAPrinterPass(dbgs()))
211 FUNCTION_PASS("print<phi-values>", PhiValuesPrinterPass(dbgs()))
212 FUNCTION_PASS("print<regions>", RegionInfoPrinterPass(dbgs()))
213 FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs()))
214 FUNCTION_PASS("print<stack-safety-local>", StackSafetyPrinterPass(dbgs()))
215 FUNCTION_PASS("reassociate", ReassociatePass())
216 FUNCTION_PASS("scalarizer", ScalarizerPass())
217 FUNCTION_PASS("sccp", SCCPPass())
218 FUNCTION_PASS("simplify-cfg", SimplifyCFGPass())
219 FUNCTION_PASS("sink", SinkingPass())
220 FUNCTION_PASS("slp-vectorizer", SLPVectorizerPass())
221 FUNCTION_PASS("speculative-execution", SpeculativeExecutionPass())
222 FUNCTION_PASS("spec-phis", SpeculateAroundPHIsPass())
223 FUNCTION_PASS("sroa", SROA())
224 FUNCTION_PASS("tailcallelim", TailCallElimPass())
225 FUNCTION_PASS("unreachableblockelim", UnreachableBlockElimPass())
226 FUNCTION_PASS("verify", VerifierPass())
227 FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass())
228 FUNCTION_PASS("verify<loops>", LoopVerifierPass())
229 FUNCTION_PASS("verify<memoryssa>", MemorySSAVerifierPass())
230 FUNCTION_PASS("verify<regions>", RegionInfoVerifierPass())
231 FUNCTION_PASS("view-cfg", CFGViewerPass())
232 FUNCTION_PASS("view-cfg-only", CFGOnlyViewerPass())
233 FUNCTION_PASS("transform-warning", WarnMissedTransformationsPass())
234 FUNCTION_PASS("msan", MemorySanitizerPass())
235 FUNCTION_PASS("tsan", ThreadSanitizerPass())
236 #undef FUNCTION_PASS
237
238 #ifndef FUNCTION_PASS_WITH_PARAMS
239 #define FUNCTION_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER)
240 #endif
241 FUNCTION_PASS_WITH_PARAMS("unroll",
242                           [](LoopUnrollOptions Opts) { return LoopUnrollPass(Opts); },
243                           parseLoopUnrollOptions)
244 #undef FUNCTION_PASS_WITH_PARAMS
245
246 #ifndef LOOP_ANALYSIS
247 #define LOOP_ANALYSIS(NAME, CREATE_PASS)
248 #endif
249 LOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis())
250 LOOP_ANALYSIS("access-info", LoopAccessAnalysis())
251 LOOP_ANALYSIS("ivusers", IVUsersAnalysis())
252 LOOP_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
253 #undef LOOP_ANALYSIS
254
255 #ifndef LOOP_PASS
256 #define LOOP_PASS(NAME, CREATE_PASS)
257 #endif
258 LOOP_PASS("invalidate<all>", InvalidateAllAnalysesPass())
259 LOOP_PASS("licm", LICMPass())
260 LOOP_PASS("loop-idiom", LoopIdiomRecognizePass())
261 LOOP_PASS("loop-instsimplify", LoopInstSimplifyPass())
262 LOOP_PASS("rotate", LoopRotatePass())
263 LOOP_PASS("no-op-loop", NoOpLoopPass())
264 LOOP_PASS("print", PrintLoopPass(dbgs()))
265 LOOP_PASS("loop-deletion", LoopDeletionPass())
266 LOOP_PASS("simplify-cfg", LoopSimplifyCFGPass())
267 LOOP_PASS("strength-reduce", LoopStrengthReducePass())
268 LOOP_PASS("indvars", IndVarSimplifyPass())
269 LOOP_PASS("irce", IRCEPass())
270 LOOP_PASS("unroll-and-jam", LoopUnrollAndJamPass())
271 LOOP_PASS("unroll-full", LoopFullUnrollPass())
272 LOOP_PASS("unswitch", SimpleLoopUnswitchPass())
273 LOOP_PASS("print-access-info", LoopAccessInfoPrinterPass(dbgs()))
274 LOOP_PASS("print<ivusers>", IVUsersPrinterPass(dbgs()))
275 LOOP_PASS("loop-predication", LoopPredicationPass())
276 #undef LOOP_PASS