1 | //===- PassRegistry.def - Registry of passes --------------------*- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | // |
9 | // This file is used as the registry of passes that are part of the core LLVM |
10 | // libraries. This file describes both transformation passes and analyses |
11 | // Analyses are registered while transformation passes have names registered |
12 | // that can be used when providing a textual pass pipeline. |
13 | // |
14 | //===----------------------------------------------------------------------===// |
15 | |
16 | // NOTE: NO INCLUDE GUARD DESIRED! |
17 | |
18 | #ifndef MODULE_ANALYSIS |
19 | #define MODULE_ANALYSIS(NAME, CREATE_PASS) |
20 | #endif |
21 | MODULE_ANALYSIS("callgraph" , CallGraphAnalysis()) |
22 | MODULE_ANALYSIS("collector-metadata" , CollectorMetadataAnalysis()) |
23 | MODULE_ANALYSIS("inline-advisor" , InlineAdvisorAnalysis()) |
24 | MODULE_ANALYSIS("ir-similarity" , IRSimilarityAnalysis()) |
25 | MODULE_ANALYSIS("lcg" , LazyCallGraphAnalysis()) |
26 | MODULE_ANALYSIS("module-summary" , ModuleSummaryIndexAnalysis()) |
27 | MODULE_ANALYSIS("no-op-module" , NoOpModuleAnalysis()) |
28 | MODULE_ANALYSIS("pass-instrumentation" , PassInstrumentationAnalysis(PIC)) |
29 | MODULE_ANALYSIS("profile-summary" , ProfileSummaryAnalysis()) |
30 | MODULE_ANALYSIS("stack-safety" , StackSafetyGlobalAnalysis()) |
31 | MODULE_ANALYSIS("verify" , VerifierAnalysis()) |
32 | |
33 | #ifndef MODULE_ALIAS_ANALYSIS |
34 | #define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS) \ |
35 | MODULE_ANALYSIS(NAME, CREATE_PASS) |
36 | #endif |
37 | MODULE_ALIAS_ANALYSIS("globals-aa" , GlobalsAA()) |
38 | #undef MODULE_ALIAS_ANALYSIS |
39 | #undef MODULE_ANALYSIS |
40 | |
41 | #ifndef MODULE_PASS |
42 | #define MODULE_PASS(NAME, CREATE_PASS) |
43 | #endif |
44 | MODULE_PASS("always-inline" , AlwaysInlinerPass()) |
45 | MODULE_PASS("annotation2metadata" , Annotation2MetadataPass()) |
46 | MODULE_PASS("attributor" , AttributorPass()) |
47 | MODULE_PASS("attributor-light" , AttributorLightPass()) |
48 | MODULE_PASS("called-value-propagation" , CalledValuePropagationPass()) |
49 | MODULE_PASS("canonicalize-aliases" , CanonicalizeAliasesPass()) |
50 | MODULE_PASS("check-debugify" , NewPMCheckDebugifyPass()) |
51 | MODULE_PASS("constmerge" , ConstantMergePass()) |
52 | MODULE_PASS("coro-cleanup" , CoroCleanupPass()) |
53 | MODULE_PASS("coro-early" , CoroEarlyPass()) |
54 | MODULE_PASS("cross-dso-cfi" , CrossDSOCFIPass()) |
55 | MODULE_PASS("deadargelim" , DeadArgumentEliminationPass()) |
56 | MODULE_PASS("debugify" , NewPMDebugifyPass()) |
57 | MODULE_PASS("dfsan" , DataFlowSanitizerPass()) |
58 | MODULE_PASS("dot-callgraph" , CallGraphDOTPrinterPass()) |
59 | MODULE_PASS("dxil-upgrade" , DXILUpgradePass()) |
60 | MODULE_PASS("elim-avail-extern" , EliminateAvailableExternallyPass()) |
61 | MODULE_PASS("extract-blocks" , BlockExtractorPass({}, false)) |
62 | MODULE_PASS("expand-variadics" , ExpandVariadicsPass(ExpandVariadicsMode::Disable)) |
63 | MODULE_PASS("forceattrs" , ForceFunctionAttrsPass()) |
64 | MODULE_PASS("function-import" , FunctionImportPass()) |
65 | MODULE_PASS("globalopt" , GlobalOptPass()) |
66 | MODULE_PASS("globalsplit" , GlobalSplitPass()) |
67 | MODULE_PASS("hipstdpar-interpose-alloc" , HipStdParAllocationInterpositionPass()) |
68 | MODULE_PASS("hipstdpar-select-accelerator-code" , |
69 | HipStdParAcceleratorCodeSelectionPass()) |
70 | MODULE_PASS("hotcoldsplit" , HotColdSplittingPass()) |
71 | MODULE_PASS("inferattrs" , InferFunctionAttrsPass()) |
72 | MODULE_PASS("inliner-ml-advisor-release" , |
73 | ModuleInlinerWrapperPass(getInlineParams(), true, {}, |
74 | InliningAdvisorMode::Release, 0)) |
75 | MODULE_PASS("inliner-wrapper" , ModuleInlinerWrapperPass()) |
76 | MODULE_PASS("inliner-wrapper-no-mandatory-first" , |
77 | ModuleInlinerWrapperPass(getInlineParams(), false)) |
78 | MODULE_PASS("insert-gcov-profiling" , GCOVProfilerPass()) |
79 | MODULE_PASS("instrorderfile" , InstrOrderFilePass()) |
80 | MODULE_PASS("instrprof" , InstrProfilingLoweringPass()) |
81 | MODULE_PASS("ctx-instr-lower" , PGOCtxProfLoweringPass()) |
82 | MODULE_PASS("invalidate<all>" , InvalidateAllAnalysesPass()) |
83 | MODULE_PASS("iroutliner" , IROutlinerPass()) |
84 | MODULE_PASS("jmc-instrumenter" , JMCInstrumenterPass()) |
85 | MODULE_PASS("lower-emutls" , LowerEmuTLSPass()) |
86 | MODULE_PASS("lower-global-dtors" , LowerGlobalDtorsPass()) |
87 | MODULE_PASS("lower-ifunc" , LowerIFuncPass()) |
88 | MODULE_PASS("lowertypetests" , LowerTypeTestsPass()) |
89 | MODULE_PASS("pgo-force-function-attrs" , PGOForceFunctionAttrsPass(PGOOpt ? PGOOpt->ColdOptType : PGOOptions::ColdFuncOpt::Default)) |
90 | MODULE_PASS("memprof-context-disambiguation" , MemProfContextDisambiguation()) |
91 | MODULE_PASS("memprof-module" , ModuleMemProfilerPass()) |
92 | MODULE_PASS("mergefunc" , MergeFunctionsPass()) |
93 | MODULE_PASS("metarenamer" , MetaRenamerPass()) |
94 | MODULE_PASS("module-inline" , ModuleInlinerPass()) |
95 | MODULE_PASS("name-anon-globals" , NameAnonGlobalPass()) |
96 | MODULE_PASS("no-op-module" , NoOpModulePass()) |
97 | MODULE_PASS("nsan" , NumericalStabilitySanitizerPass()) |
98 | MODULE_PASS("objc-arc-apelim" , ObjCARCAPElimPass()) |
99 | MODULE_PASS("openmp-opt" , OpenMPOptPass()) |
100 | MODULE_PASS("openmp-opt-postlink" , |
101 | OpenMPOptPass(ThinOrFullLTOPhase::FullLTOPostLink)) |
102 | MODULE_PASS("partial-inliner" , PartialInlinerPass()) |
103 | MODULE_PASS("pgo-icall-prom" , PGOIndirectCallPromotion()) |
104 | MODULE_PASS("pgo-instr-gen" , PGOInstrumentationGen()) |
105 | MODULE_PASS("pgo-instr-use" , PGOInstrumentationUse()) |
106 | MODULE_PASS("poison-checking" , PoisonCheckingPass()) |
107 | MODULE_PASS("pre-isel-intrinsic-lowering" , PreISelIntrinsicLoweringPass(*TM)) |
108 | MODULE_PASS("print" , PrintModulePass(dbgs())) |
109 | MODULE_PASS("print-callgraph" , CallGraphPrinterPass(dbgs())) |
110 | MODULE_PASS("print-callgraph-sccs" , CallGraphSCCsPrinterPass(dbgs())) |
111 | MODULE_PASS("print-ir-similarity" , IRSimilarityAnalysisPrinterPass(dbgs())) |
112 | MODULE_PASS("print-lcg" , LazyCallGraphPrinterPass(dbgs())) |
113 | MODULE_PASS("print-lcg-dot" , LazyCallGraphDOTPrinterPass(dbgs())) |
114 | MODULE_PASS("print-must-be-executed-contexts" , |
115 | MustBeExecutedContextPrinterPass(dbgs())) |
116 | MODULE_PASS("print-profile-summary" , ProfileSummaryPrinterPass(dbgs())) |
117 | MODULE_PASS("print-stack-safety" , StackSafetyGlobalPrinterPass(dbgs())) |
118 | MODULE_PASS("print<inline-advisor>" , InlineAdvisorAnalysisPrinterPass(dbgs())) |
119 | MODULE_PASS("print<module-debuginfo>" , ModuleDebugInfoPrinterPass(dbgs())) |
120 | MODULE_PASS("pseudo-probe" , SampleProfileProbePass(TM)) |
121 | MODULE_PASS("pseudo-probe-update" , PseudoProbeUpdatePass()) |
122 | MODULE_PASS("recompute-globalsaa" , RecomputeGlobalsAAPass()) |
123 | MODULE_PASS("rel-lookup-table-converter" , RelLookupTableConverterPass()) |
124 | MODULE_PASS("rewrite-statepoints-for-gc" , RewriteStatepointsForGC()) |
125 | MODULE_PASS("rewrite-symbols" , RewriteSymbolPass()) |
126 | MODULE_PASS("rpo-function-attrs" , ReversePostOrderFunctionAttrsPass()) |
127 | MODULE_PASS("sample-profile" , SampleProfileLoaderPass()) |
128 | MODULE_PASS("sancov-module" , SanitizerCoveragePass()) |
129 | MODULE_PASS("sanmd-module" , SanitizerBinaryMetadataPass()) |
130 | MODULE_PASS("scc-oz-module-inliner" , |
131 | buildInlinerPipeline(OptimizationLevel::Oz, |
132 | ThinOrFullLTOPhase::None)) |
133 | MODULE_PASS("shadow-stack-gc-lowering" , ShadowStackGCLoweringPass()) |
134 | MODULE_PASS("strip" , StripSymbolsPass()) |
135 | MODULE_PASS("strip-dead-debug-info" , StripDeadDebugInfoPass()) |
136 | MODULE_PASS("strip-dead-prototypes" , StripDeadPrototypesPass()) |
137 | MODULE_PASS("strip-debug-declare" , StripDebugDeclarePass()) |
138 | MODULE_PASS("strip-nondebug" , StripNonDebugSymbolsPass()) |
139 | MODULE_PASS("strip-nonlinetable-debuginfo" , StripNonLineTableDebugInfoPass()) |
140 | MODULE_PASS("synthetic-counts-propagation" , SyntheticCountsPropagation()) |
141 | MODULE_PASS("trigger-crash-module" , TriggerCrashModulePass()) |
142 | MODULE_PASS("trigger-verifier-error" , TriggerVerifierErrorPass()) |
143 | MODULE_PASS("tsan-module" , ModuleThreadSanitizerPass()) |
144 | MODULE_PASS("verify" , VerifierPass()) |
145 | MODULE_PASS("view-callgraph" , CallGraphViewerPass()) |
146 | MODULE_PASS("wholeprogramdevirt" , WholeProgramDevirtPass()) |
147 | #undef MODULE_PASS |
148 | |
149 | #ifndef MODULE_PASS_WITH_PARAMS |
150 | #define MODULE_PASS_WITH_PARAMS(NAME, CLASS, CREATE_PASS, PARSER, PARAMS) |
151 | #endif |
152 | MODULE_PASS_WITH_PARAMS( |
153 | "asan" , "AddressSanitizerPass" , |
154 | [](AddressSanitizerOptions Opts) { return AddressSanitizerPass(Opts); }, |
155 | parseASanPassOptions, "kernel" ) |
156 | MODULE_PASS_WITH_PARAMS( |
157 | "cg-profile" , "CGProfilePass" , |
158 | [](bool InLTOPostLink) { return CGProfilePass(InLTOPostLink);}, |
159 | parseCGProfilePassOptions, "in-lto-post-link" ) |
160 | MODULE_PASS_WITH_PARAMS( |
161 | "global-merge" , "GlobalMergePass" , |
162 | [TM = TM](GlobalMergeOptions Opts) { return GlobalMergePass(TM, Opts); }, |
163 | parseGlobalMergeOptions, |
164 | "group-by-use;ignore-single-use;max-offset=N;merge-const;merge-external;" |
165 | "no-group-by-use;no-ignore-single-use;no-merge-const;no-merge-external;" |
166 | "size-only" ) |
167 | MODULE_PASS_WITH_PARAMS( |
168 | "embed-bitcode" , "EmbedBitcodePass" , |
169 | [](EmbedBitcodeOptions Opts) { return EmbedBitcodePass(Opts); }, |
170 | parseEmbedBitcodePassOptions, "thinlto;emit-summary" ) |
171 | MODULE_PASS_WITH_PARAMS( |
172 | "globaldce" , "GlobalDCEPass" , |
173 | [](bool InLTOPostLink) { return GlobalDCEPass(InLTOPostLink); }, |
174 | parseGlobalDCEPassOptions, "in-lto-post-link" ) |
175 | MODULE_PASS_WITH_PARAMS( |
176 | "hwasan" , "HWAddressSanitizerPass" , |
177 | [](HWAddressSanitizerOptions Opts) { return HWAddressSanitizerPass(Opts); }, |
178 | parseHWASanPassOptions, "kernel;recover" ) |
179 | MODULE_PASS_WITH_PARAMS( |
180 | "internalize" , "InternalizePass" , |
181 | [](SmallVector<std::string, 0> PreservedGVs) { |
182 | if (PreservedGVs.empty()) |
183 | return InternalizePass(); |
184 | auto MustPreserveGV = [=](const GlobalValue &GV) { |
185 | for (auto &PreservedGV : PreservedGVs) |
186 | if (GV.getName() == PreservedGV) |
187 | return true; |
188 | return false; |
189 | }; |
190 | return InternalizePass(MustPreserveGV); |
191 | }, |
192 | parseInternalizeGVs, "preserve-gv=GV" ) |
193 | MODULE_PASS_WITH_PARAMS( |
194 | "ipsccp" , "IPSCCPPass" , [](IPSCCPOptions Opts) { return IPSCCPPass(Opts); }, |
195 | parseIPSCCPOptions, "no-func-spec;func-spec" ) |
196 | MODULE_PASS_WITH_PARAMS( |
197 | "loop-extract" , "LoopExtractorPass" , |
198 | [](bool Single) { |
199 | if (Single) |
200 | return LoopExtractorPass(1); |
201 | return LoopExtractorPass(); |
202 | }, |
203 | parseLoopExtractorPassOptions, "single" ) |
204 | MODULE_PASS_WITH_PARAMS( |
205 | "memprof-use" , "MemProfUsePass" , |
206 | [](std::string Opts) { return MemProfUsePass(Opts); }, |
207 | parseMemProfUsePassOptions, "profile-filename=S" ) |
208 | MODULE_PASS_WITH_PARAMS( |
209 | "msan" , "MemorySanitizerPass" , |
210 | [](MemorySanitizerOptions Opts) { return MemorySanitizerPass(Opts); }, |
211 | parseMSanPassOptions, "recover;kernel;eager-checks;track-origins=N" ) |
212 | MODULE_PASS_WITH_PARAMS( |
213 | "print<structural-hash>" , "StructuralHashPrinterPass" , |
214 | [](bool EnableDetailedStructuralHash) { |
215 | return StructuralHashPrinterPass(dbgs(), EnableDetailedStructuralHash); |
216 | }, |
217 | parseStructuralHashPrinterPassOptions, "detailed" ) |
218 | #undef MODULE_PASS_WITH_PARAMS |
219 | |
220 | #ifndef CGSCC_ANALYSIS |
221 | #define CGSCC_ANALYSIS(NAME, CREATE_PASS) |
222 | #endif |
223 | CGSCC_ANALYSIS("no-op-cgscc" , NoOpCGSCCAnalysis()) |
224 | CGSCC_ANALYSIS("fam-proxy" , FunctionAnalysisManagerCGSCCProxy()) |
225 | CGSCC_ANALYSIS("pass-instrumentation" , PassInstrumentationAnalysis(PIC)) |
226 | #undef CGSCC_ANALYSIS |
227 | |
228 | #ifndef CGSCC_PASS |
229 | #define CGSCC_PASS(NAME, CREATE_PASS) |
230 | #endif |
231 | CGSCC_PASS("argpromotion" , ArgumentPromotionPass()) |
232 | CGSCC_PASS("attributor-cgscc" , AttributorCGSCCPass()) |
233 | CGSCC_PASS("attributor-light-cgscc" , AttributorLightCGSCCPass()) |
234 | CGSCC_PASS("invalidate<all>" , InvalidateAllAnalysesPass()) |
235 | CGSCC_PASS("no-op-cgscc" , NoOpCGSCCPass()) |
236 | CGSCC_PASS("openmp-opt-cgscc" , OpenMPOptCGSCCPass()) |
237 | #undef CGSCC_PASS |
238 | |
239 | #ifndef CGSCC_PASS_WITH_PARAMS |
240 | #define CGSCC_PASS_WITH_PARAMS(NAME, CLASS, CREATE_PASS, PARSER, PARAMS) |
241 | #endif |
242 | CGSCC_PASS_WITH_PARAMS( |
243 | "coro-split" , "CoroSplitPass" , |
244 | [](bool OptimizeFrame) { return CoroSplitPass(OptimizeFrame); }, |
245 | parseCoroSplitPassOptions, "reuse-storage" ) |
246 | CGSCC_PASS_WITH_PARAMS( |
247 | "function-attrs" , "PostOrderFunctionAttrsPass" , |
248 | [](bool SkipNonRecursive) { |
249 | return PostOrderFunctionAttrsPass(SkipNonRecursive); |
250 | }, |
251 | parsePostOrderFunctionAttrsPassOptions, "skip-non-recursive-function-attrs" ) |
252 | CGSCC_PASS_WITH_PARAMS( |
253 | "inline" , "InlinerPass" , |
254 | [](bool OnlyMandatory) { return InlinerPass(OnlyMandatory); }, |
255 | parseInlinerPassOptions, "only-mandatory" ) |
256 | #undef CGSCC_PASS_WITH_PARAMS |
257 | |
258 | #ifndef FUNCTION_ANALYSIS |
259 | #define FUNCTION_ANALYSIS(NAME, CREATE_PASS) |
260 | #endif |
261 | FUNCTION_ANALYSIS("aa" , AAManager()) |
262 | FUNCTION_ANALYSIS("access-info" , LoopAccessAnalysis()) |
263 | FUNCTION_ANALYSIS("assumptions" , AssumptionAnalysis()) |
264 | FUNCTION_ANALYSIS("bb-sections-profile-reader" , BasicBlockSectionsProfileReaderAnalysis(TM)) |
265 | FUNCTION_ANALYSIS("block-freq" , BlockFrequencyAnalysis()) |
266 | FUNCTION_ANALYSIS("branch-prob" , BranchProbabilityAnalysis()) |
267 | FUNCTION_ANALYSIS("cycles" , CycleAnalysis()) |
268 | FUNCTION_ANALYSIS("da" , DependenceAnalysis()) |
269 | FUNCTION_ANALYSIS("debug-ata" , DebugAssignmentTrackingAnalysis()) |
270 | FUNCTION_ANALYSIS("demanded-bits" , DemandedBitsAnalysis()) |
271 | FUNCTION_ANALYSIS("domfrontier" , DominanceFrontierAnalysis()) |
272 | FUNCTION_ANALYSIS("domtree" , DominatorTreeAnalysis()) |
273 | FUNCTION_ANALYSIS("func-properties" , FunctionPropertiesAnalysis()) |
274 | FUNCTION_ANALYSIS( |
275 | "machine-function-info" , |
276 | MachineFunctionAnalysis(static_cast<const LLVMTargetMachine *>(TM))) |
277 | FUNCTION_ANALYSIS("gc-function" , GCFunctionAnalysis()) |
278 | FUNCTION_ANALYSIS("inliner-size-estimator" , InlineSizeEstimatorAnalysis()) |
279 | FUNCTION_ANALYSIS("lazy-value-info" , LazyValueAnalysis()) |
280 | FUNCTION_ANALYSIS("loops" , LoopAnalysis()) |
281 | FUNCTION_ANALYSIS("memdep" , MemoryDependenceAnalysis()) |
282 | FUNCTION_ANALYSIS("memoryssa" , MemorySSAAnalysis()) |
283 | FUNCTION_ANALYSIS("no-op-function" , NoOpFunctionAnalysis()) |
284 | FUNCTION_ANALYSIS("opt-remark-emit" , OptimizationRemarkEmitterAnalysis()) |
285 | FUNCTION_ANALYSIS("pass-instrumentation" , PassInstrumentationAnalysis(PIC)) |
286 | FUNCTION_ANALYSIS("phi-values" , PhiValuesAnalysis()) |
287 | FUNCTION_ANALYSIS("postdomtree" , PostDominatorTreeAnalysis()) |
288 | FUNCTION_ANALYSIS("regions" , RegionInfoAnalysis()) |
289 | FUNCTION_ANALYSIS("scalar-evolution" , ScalarEvolutionAnalysis()) |
290 | FUNCTION_ANALYSIS("should-not-run-function-passes" , |
291 | ShouldNotRunFunctionPassesAnalysis()) |
292 | FUNCTION_ANALYSIS("should-run-extra-vector-passes" , |
293 | ShouldRunExtraVectorPasses()) |
294 | FUNCTION_ANALYSIS("ssp-layout" , SSPLayoutAnalysis()) |
295 | FUNCTION_ANALYSIS("stack-safety-local" , StackSafetyAnalysis()) |
296 | FUNCTION_ANALYSIS("target-ir" , |
297 | TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis()) |
298 | FUNCTION_ANALYSIS("target-lib-info" , TargetLibraryAnalysis()) |
299 | FUNCTION_ANALYSIS("uniformity" , UniformityInfoAnalysis()) |
300 | FUNCTION_ANALYSIS("verify" , VerifierAnalysis()) |
301 | |
302 | #ifndef FUNCTION_ALIAS_ANALYSIS |
303 | #define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS) \ |
304 | FUNCTION_ANALYSIS(NAME, CREATE_PASS) |
305 | #endif |
306 | FUNCTION_ALIAS_ANALYSIS("basic-aa" , BasicAA()) |
307 | FUNCTION_ALIAS_ANALYSIS("objc-arc-aa" , objcarc::ObjCARCAA()) |
308 | FUNCTION_ALIAS_ANALYSIS("scev-aa" , SCEVAA()) |
309 | FUNCTION_ALIAS_ANALYSIS("scoped-noalias-aa" , ScopedNoAliasAA()) |
310 | FUNCTION_ALIAS_ANALYSIS("tbaa" , TypeBasedAA()) |
311 | #undef FUNCTION_ALIAS_ANALYSIS |
312 | #undef FUNCTION_ANALYSIS |
313 | |
314 | #ifndef FUNCTION_PASS |
315 | #define FUNCTION_PASS(NAME, CREATE_PASS) |
316 | #endif |
317 | FUNCTION_PASS("aa-eval" , AAEvaluator()) |
318 | FUNCTION_PASS("adce" , ADCEPass()) |
319 | FUNCTION_PASS("add-discriminators" , AddDiscriminatorsPass()) |
320 | FUNCTION_PASS("aggressive-instcombine" , AggressiveInstCombinePass()) |
321 | FUNCTION_PASS("alignment-from-assumptions" , AlignmentFromAssumptionsPass()) |
322 | FUNCTION_PASS("annotation-remarks" , AnnotationRemarksPass()) |
323 | FUNCTION_PASS("assume-builder" , AssumeBuilderPass()) |
324 | FUNCTION_PASS("assume-simplify" , AssumeSimplifyPass()) |
325 | FUNCTION_PASS("atomic-expand" , AtomicExpandPass(TM)) |
326 | FUNCTION_PASS("bdce" , BDCEPass()) |
327 | FUNCTION_PASS("bounds-checking" , BoundsCheckingPass()) |
328 | FUNCTION_PASS("break-crit-edges" , BreakCriticalEdgesPass()) |
329 | FUNCTION_PASS("callbr-prepare" , CallBrPreparePass()) |
330 | FUNCTION_PASS("callsite-splitting" , CallSiteSplittingPass()) |
331 | FUNCTION_PASS("chr" , ControlHeightReductionPass()) |
332 | FUNCTION_PASS("codegenprepare" , CodeGenPreparePass(TM)) |
333 | FUNCTION_PASS("consthoist" , ConstantHoistingPass()) |
334 | FUNCTION_PASS("constraint-elimination" , ConstraintEliminationPass()) |
335 | FUNCTION_PASS("coro-elide" , CoroElidePass()) |
336 | FUNCTION_PASS("correlated-propagation" , CorrelatedValuePropagationPass()) |
337 | FUNCTION_PASS("count-visits" , CountVisitsPass()) |
338 | FUNCTION_PASS("dce" , DCEPass()) |
339 | FUNCTION_PASS("declare-to-assign" , llvm::AssignmentTrackingPass()) |
340 | FUNCTION_PASS("dfa-jump-threading" , DFAJumpThreadingPass()) |
341 | FUNCTION_PASS("div-rem-pairs" , DivRemPairsPass()) |
342 | FUNCTION_PASS("dot-cfg" , CFGPrinterPass()) |
343 | FUNCTION_PASS("dot-cfg-only" , CFGOnlyPrinterPass()) |
344 | FUNCTION_PASS("dot-dom" , DomPrinter()) |
345 | FUNCTION_PASS("dot-dom-only" , DomOnlyPrinter()) |
346 | FUNCTION_PASS("dot-post-dom" , PostDomPrinter()) |
347 | FUNCTION_PASS("dot-post-dom-only" , PostDomOnlyPrinter()) |
348 | FUNCTION_PASS("dse" , DSEPass()) |
349 | FUNCTION_PASS("dwarf-eh-prepare" , DwarfEHPreparePass(TM)) |
350 | FUNCTION_PASS("expand-large-div-rem" , ExpandLargeDivRemPass(TM)) |
351 | FUNCTION_PASS("expand-large-fp-convert" , ExpandLargeFpConvertPass(TM)) |
352 | FUNCTION_PASS("expand-memcmp" , ExpandMemCmpPass(TM)) |
353 | FUNCTION_PASS("fix-irreducible" , FixIrreduciblePass()) |
354 | FUNCTION_PASS("flatten-cfg" , FlattenCFGPass()) |
355 | FUNCTION_PASS("float2int" , Float2IntPass()) |
356 | FUNCTION_PASS("gc-lowering" , GCLoweringPass()) |
357 | FUNCTION_PASS("guard-widening" , GuardWideningPass()) |
358 | FUNCTION_PASS("gvn-hoist" , GVNHoistPass()) |
359 | FUNCTION_PASS("gvn-sink" , GVNSinkPass()) |
360 | FUNCTION_PASS("helloworld" , HelloWorldPass()) |
361 | FUNCTION_PASS("indirectbr-expand" , IndirectBrExpandPass(TM)) |
362 | FUNCTION_PASS("infer-address-spaces" , InferAddressSpacesPass()) |
363 | FUNCTION_PASS("infer-alignment" , InferAlignmentPass()) |
364 | FUNCTION_PASS("inject-tli-mappings" , InjectTLIMappings()) |
365 | FUNCTION_PASS("instcount" , InstCountPass()) |
366 | FUNCTION_PASS("instnamer" , InstructionNamerPass()) |
367 | FUNCTION_PASS("instsimplify" , InstSimplifyPass()) |
368 | FUNCTION_PASS("interleaved-access" , InterleavedAccessPass(TM)) |
369 | FUNCTION_PASS("interleaved-load-combine" , InterleavedLoadCombinePass(TM)) |
370 | FUNCTION_PASS("invalidate<all>" , InvalidateAllAnalysesPass()) |
371 | FUNCTION_PASS("irce" , IRCEPass()) |
372 | FUNCTION_PASS("jump-threading" , JumpThreadingPass()) |
373 | FUNCTION_PASS("jump-table-to-switch" , JumpTableToSwitchPass()); |
374 | FUNCTION_PASS("kcfi" , KCFIPass()) |
375 | FUNCTION_PASS("lcssa" , LCSSAPass()) |
376 | FUNCTION_PASS("libcalls-shrinkwrap" , LibCallsShrinkWrapPass()) |
377 | FUNCTION_PASS("lint" , LintPass()) |
378 | FUNCTION_PASS("load-store-vectorizer" , LoadStoreVectorizerPass()) |
379 | FUNCTION_PASS("loop-data-prefetch" , LoopDataPrefetchPass()) |
380 | FUNCTION_PASS("loop-distribute" , LoopDistributePass()) |
381 | FUNCTION_PASS("loop-fusion" , LoopFusePass()) |
382 | FUNCTION_PASS("loop-load-elim" , LoopLoadEliminationPass()) |
383 | FUNCTION_PASS("loop-simplify" , LoopSimplifyPass()) |
384 | FUNCTION_PASS("loop-sink" , LoopSinkPass()) |
385 | FUNCTION_PASS("loop-versioning" , LoopVersioningPass()) |
386 | FUNCTION_PASS("lower-allow-check" , LowerAllowCheckPass()) |
387 | FUNCTION_PASS("lower-atomic" , LowerAtomicPass()) |
388 | FUNCTION_PASS("lower-constant-intrinsics" , LowerConstantIntrinsicsPass()) |
389 | FUNCTION_PASS("lower-expect" , LowerExpectIntrinsicPass()) |
390 | FUNCTION_PASS("lower-guard-intrinsic" , LowerGuardIntrinsicPass()) |
391 | FUNCTION_PASS("lower-invoke" , LowerInvokePass()) |
392 | FUNCTION_PASS("lower-switch" , LowerSwitchPass()) |
393 | FUNCTION_PASS("lower-widenable-condition" , LowerWidenableConditionPass()) |
394 | FUNCTION_PASS("make-guards-explicit" , MakeGuardsExplicitPass()) |
395 | FUNCTION_PASS("mem2reg" , PromotePass()) |
396 | FUNCTION_PASS("memcpyopt" , MemCpyOptPass()) |
397 | FUNCTION_PASS("memprof" , MemProfilerPass()) |
398 | FUNCTION_PASS("mergeicmps" , MergeICmpsPass()) |
399 | FUNCTION_PASS("mergereturn" , UnifyFunctionExitNodesPass()) |
400 | FUNCTION_PASS("move-auto-init" , MoveAutoInitPass()) |
401 | FUNCTION_PASS("nary-reassociate" , NaryReassociatePass()) |
402 | FUNCTION_PASS("newgvn" , NewGVNPass()) |
403 | FUNCTION_PASS("no-op-function" , NoOpFunctionPass()) |
404 | FUNCTION_PASS("objc-arc" , ObjCARCOptPass()) |
405 | FUNCTION_PASS("objc-arc-contract" , ObjCARCContractPass()) |
406 | FUNCTION_PASS("objc-arc-expand" , ObjCARCExpandPass()) |
407 | FUNCTION_PASS("pa-eval" , PAEvalPass()) |
408 | FUNCTION_PASS("partially-inline-libcalls" , PartiallyInlineLibCallsPass()) |
409 | FUNCTION_PASS("pgo-memop-opt" , PGOMemOPSizeOpt()) |
410 | FUNCTION_PASS("place-safepoints" , PlaceSafepointsPass()) |
411 | FUNCTION_PASS("print" , PrintFunctionPass(dbgs())) |
412 | // TODO: rename to print<foo> after NPM switch |
413 | FUNCTION_PASS("print-alias-sets" , AliasSetsPrinterPass(dbgs())) |
414 | FUNCTION_PASS("print-cfg-sccs" , CFGSCCPrinterPass(dbgs())) |
415 | FUNCTION_PASS("print-memderefs" , MemDerefPrinterPass(dbgs())) |
416 | FUNCTION_PASS("print-mustexecute" , MustExecutePrinterPass(dbgs())) |
417 | FUNCTION_PASS("print-predicateinfo" , PredicateInfoPrinterPass(dbgs())) |
418 | FUNCTION_PASS("print<access-info>" , LoopAccessInfoPrinterPass(dbgs())) |
419 | FUNCTION_PASS("print<assumptions>" , AssumptionPrinterPass(dbgs())) |
420 | FUNCTION_PASS("print<block-freq>" , BlockFrequencyPrinterPass(dbgs())) |
421 | FUNCTION_PASS("print<branch-prob>" , BranchProbabilityPrinterPass(dbgs())) |
422 | FUNCTION_PASS("print<cost-model>" , CostModelPrinterPass(dbgs())) |
423 | FUNCTION_PASS("print<cycles>" , CycleInfoPrinterPass(dbgs())) |
424 | FUNCTION_PASS("print<da>" , DependenceAnalysisPrinterPass(dbgs())) |
425 | FUNCTION_PASS("print<debug-ata>" , DebugAssignmentTrackingPrinterPass(dbgs())) |
426 | FUNCTION_PASS("print<delinearization>" , DelinearizationPrinterPass(dbgs())) |
427 | FUNCTION_PASS("print<demanded-bits>" , DemandedBitsPrinterPass(dbgs())) |
428 | FUNCTION_PASS("print<domfrontier>" , DominanceFrontierPrinterPass(dbgs())) |
429 | FUNCTION_PASS("print<domtree>" , DominatorTreePrinterPass(dbgs())) |
430 | FUNCTION_PASS("print<func-properties>" , FunctionPropertiesPrinterPass(dbgs())) |
431 | FUNCTION_PASS("print<inline-cost>" , InlineCostAnnotationPrinterPass(dbgs())) |
432 | FUNCTION_PASS("print<inliner-size-estimator>" , |
433 | InlineSizeEstimatorAnalysisPrinterPass(dbgs())) |
434 | FUNCTION_PASS("print<lazy-value-info>" , LazyValueInfoPrinterPass(dbgs())) |
435 | FUNCTION_PASS("print<loops>" , LoopPrinterPass(dbgs())) |
436 | FUNCTION_PASS("print<memoryssa-walker>" , MemorySSAWalkerPrinterPass(dbgs())) |
437 | FUNCTION_PASS("print<phi-values>" , PhiValuesPrinterPass(dbgs())) |
438 | FUNCTION_PASS("print<postdomtree>" , PostDominatorTreePrinterPass(dbgs())) |
439 | FUNCTION_PASS("print<regions>" , RegionInfoPrinterPass(dbgs())) |
440 | FUNCTION_PASS("print<scalar-evolution>" , ScalarEvolutionPrinterPass(dbgs())) |
441 | FUNCTION_PASS("print<stack-safety-local>" , StackSafetyPrinterPass(dbgs())) |
442 | FUNCTION_PASS("print<uniformity>" , UniformityInfoPrinterPass(dbgs())) |
443 | FUNCTION_PASS("reassociate" , ReassociatePass()) |
444 | FUNCTION_PASS("redundant-dbg-inst-elim" , RedundantDbgInstEliminationPass()) |
445 | FUNCTION_PASS("reg2mem" , RegToMemPass()) |
446 | FUNCTION_PASS("safe-stack" , SafeStackPass(TM)) |
447 | FUNCTION_PASS("scalarize-masked-mem-intrin" , ScalarizeMaskedMemIntrinPass()) |
448 | FUNCTION_PASS("scalarizer" , ScalarizerPass()) |
449 | FUNCTION_PASS("sccp" , SCCPPass()) |
450 | FUNCTION_PASS("select-optimize" , SelectOptimizePass(TM)) |
451 | FUNCTION_PASS("separate-const-offset-from-gep" , |
452 | SeparateConstOffsetFromGEPPass()) |
453 | FUNCTION_PASS("sink" , SinkingPass()) |
454 | FUNCTION_PASS("sjlj-eh-prepare" , SjLjEHPreparePass(TM)) |
455 | FUNCTION_PASS("slp-vectorizer" , SLPVectorizerPass()) |
456 | FUNCTION_PASS("slsr" , StraightLineStrengthReducePass()) |
457 | FUNCTION_PASS("stack-protector" , StackProtectorPass(TM)) |
458 | FUNCTION_PASS("strip-gc-relocates" , StripGCRelocates()) |
459 | FUNCTION_PASS("structurizecfg" , StructurizeCFGPass()) |
460 | FUNCTION_PASS("tailcallelim" , TailCallElimPass()) |
461 | FUNCTION_PASS("tlshoist" , TLSVariableHoistPass()) |
462 | FUNCTION_PASS("transform-warning" , WarnMissedTransformationsPass()) |
463 | FUNCTION_PASS("trigger-crash-function" , TriggerCrashFunctionPass()) |
464 | FUNCTION_PASS("trigger-verifier-error" , TriggerVerifierErrorPass()) |
465 | FUNCTION_PASS("tsan" , ThreadSanitizerPass()) |
466 | FUNCTION_PASS("typepromotion" , TypePromotionPass(TM)) |
467 | FUNCTION_PASS("unify-loop-exits" , UnifyLoopExitsPass()) |
468 | FUNCTION_PASS("vector-combine" , VectorCombinePass()) |
469 | FUNCTION_PASS("verify" , VerifierPass()) |
470 | FUNCTION_PASS("verify<domtree>" , DominatorTreeVerifierPass()) |
471 | FUNCTION_PASS("verify<loops>" , LoopVerifierPass()) |
472 | FUNCTION_PASS("verify<memoryssa>" , MemorySSAVerifierPass()) |
473 | FUNCTION_PASS("verify<regions>" , RegionInfoVerifierPass()) |
474 | FUNCTION_PASS("verify<safepoint-ir>" , SafepointIRVerifierPass()) |
475 | FUNCTION_PASS("verify<scalar-evolution>" , ScalarEvolutionVerifierPass()) |
476 | FUNCTION_PASS("view-cfg" , CFGViewerPass()) |
477 | FUNCTION_PASS("view-cfg-only" , CFGOnlyViewerPass()) |
478 | FUNCTION_PASS("view-dom" , DomViewer()) |
479 | FUNCTION_PASS("view-dom-only" , DomOnlyViewer()) |
480 | FUNCTION_PASS("view-post-dom" , PostDomViewer()) |
481 | FUNCTION_PASS("view-post-dom-only" , PostDomOnlyViewer()) |
482 | FUNCTION_PASS("wasm-eh-prepare" , WasmEHPreparePass()) |
483 | #undef FUNCTION_PASS |
484 | |
485 | #ifndef FUNCTION_PASS_WITH_PARAMS |
486 | #define FUNCTION_PASS_WITH_PARAMS(NAME, CLASS, CREATE_PASS, PARSER, PARAMS) |
487 | #endif |
488 | FUNCTION_PASS_WITH_PARAMS( |
489 | "cfguard" , "CFGuardPass" , |
490 | [](CFGuardPass::Mechanism M) { return CFGuardPass(M); }, |
491 | parseCFGuardPassOptions, "check;dispatch" ) |
492 | FUNCTION_PASS_WITH_PARAMS( |
493 | "early-cse" , "EarlyCSEPass" , |
494 | [](bool UseMemorySSA) { return EarlyCSEPass(UseMemorySSA); }, |
495 | parseEarlyCSEPassOptions, "memssa" ) |
496 | FUNCTION_PASS_WITH_PARAMS( |
497 | "ee-instrument" , "EntryExitInstrumenterPass" , |
498 | [](bool PostInlining) { return EntryExitInstrumenterPass(PostInlining); }, |
499 | parseEntryExitInstrumenterPassOptions, "post-inline" ) |
500 | FUNCTION_PASS_WITH_PARAMS( |
501 | "function-simplification" , "" , |
502 | [this](OptimizationLevel OL) { |
503 | return buildFunctionSimplificationPipeline(OL, ThinOrFullLTOPhase::None); |
504 | }, |
505 | parseFunctionSimplificationPipelineOptions, "O1;O2;O3;Os;Oz" ) |
506 | FUNCTION_PASS_WITH_PARAMS( |
507 | "gvn" , "GVNPass" , [](GVNOptions Opts) { return GVNPass(Opts); }, |
508 | parseGVNOptions, |
509 | "no-pre;pre;no-load-pre;load-pre;no-split-backedge-load-pre;" |
510 | "split-backedge-load-pre;no-memdep;memdep" ) |
511 | FUNCTION_PASS_WITH_PARAMS( |
512 | "hardware-loops" , "HardwareLoopsPass" , |
513 | [](HardwareLoopOptions Opts) { return HardwareLoopsPass(Opts); }, |
514 | parseHardwareLoopOptions, |
515 | "force-hardware-loops;force-hardware-loop-phi;force-nested-hardware-loop;" |
516 | "force-hardware-loop-guard;hardware-loop-decrement=N;" |
517 | "hardware-loop-counter-bitwidth=N" ) |
518 | FUNCTION_PASS_WITH_PARAMS( |
519 | "instcombine" , "InstCombinePass" , |
520 | [](InstCombineOptions Opts) { return InstCombinePass(Opts); }, |
521 | parseInstCombineOptions, |
522 | "no-use-loop-info;use-loop-info;no-verify-fixpoint;verify-fixpoint;" |
523 | "max-iterations=N" ) |
524 | FUNCTION_PASS_WITH_PARAMS( |
525 | "loop-unroll" , "LoopUnrollPass" , |
526 | [](LoopUnrollOptions Opts) { return LoopUnrollPass(Opts); }, |
527 | parseLoopUnrollOptions, |
528 | "O0;O1;O2;O3;full-unroll-max=N;no-partial;partial;no-peeling;peeling;" |
529 | "no-profile-peeling;profile-peeling;no-runtime;runtime;no-upperbound;" |
530 | "upperbound" ) |
531 | FUNCTION_PASS_WITH_PARAMS( |
532 | "loop-vectorize" , "LoopVectorizePass" , |
533 | [](LoopVectorizeOptions Opts) { return LoopVectorizePass(Opts); }, |
534 | parseLoopVectorizeOptions, |
535 | "no-interleave-forced-only;interleave-forced-only;no-vectorize-forced-only;" |
536 | "vectorize-forced-only" ) |
537 | FUNCTION_PASS_WITH_PARAMS( |
538 | "lower-matrix-intrinsics" , "LowerMatrixIntrinsicsPass" , |
539 | [](bool Minimal) { return LowerMatrixIntrinsicsPass(Minimal); }, |
540 | parseLowerMatrixIntrinsicsPassOptions, "minimal" ) |
541 | FUNCTION_PASS_WITH_PARAMS( |
542 | "mldst-motion" , "MergedLoadStoreMotionPass" , |
543 | [](MergedLoadStoreMotionOptions Opts) { |
544 | return MergedLoadStoreMotionPass(Opts); |
545 | }, |
546 | parseMergedLoadStoreMotionOptions, "no-split-footer-bb;split-footer-bb" ) |
547 | FUNCTION_PASS_WITH_PARAMS( |
548 | "print<da>" , "DependenceAnalysisPrinterPass" , |
549 | [](bool NormalizeResults) { |
550 | return DependenceAnalysisPrinterPass(dbgs(), NormalizeResults); |
551 | }, |
552 | parseDependenceAnalysisPrinterOptions, "normalized-results" ) |
553 | FUNCTION_PASS_WITH_PARAMS( |
554 | "print<memoryssa>" , "MemorySSAPrinterPass" , |
555 | [](bool NoEnsureOptimizedUses) { |
556 | return MemorySSAPrinterPass(dbgs(), !NoEnsureOptimizedUses); |
557 | }, |
558 | parseMemorySSAPrinterPassOptions, "no-ensure-optimized-uses" ) |
559 | FUNCTION_PASS_WITH_PARAMS( |
560 | "print<stack-lifetime>" , "StackLifetimePrinterPass" , |
561 | [](StackLifetime::LivenessType Type) { |
562 | return StackLifetimePrinterPass(dbgs(), Type); |
563 | }, |
564 | parseStackLifetimeOptions, "may;must" ) |
565 | FUNCTION_PASS_WITH_PARAMS( |
566 | "separate-const-offset-from-gep" , "SeparateConstOffsetFromGEPPass" , |
567 | [](bool LowerGEP) { return SeparateConstOffsetFromGEPPass(LowerGEP); }, |
568 | parseSeparateConstOffsetFromGEPPassOptions, "lower-gep" ) |
569 | FUNCTION_PASS_WITH_PARAMS( |
570 | "simplifycfg" , "SimplifyCFGPass" , |
571 | [](SimplifyCFGOptions Opts) { return SimplifyCFGPass(Opts); }, |
572 | parseSimplifyCFGOptions, |
573 | "no-forward-switch-cond;forward-switch-cond;no-switch-range-to-icmp;" |
574 | "switch-range-to-icmp;no-switch-to-lookup;switch-to-lookup;no-keep-loops;" |
575 | "keep-loops;no-hoist-common-insts;hoist-common-insts;no-sink-common-insts;" |
576 | "sink-common-insts;bonus-inst-threshold=N" ) |
577 | FUNCTION_PASS_WITH_PARAMS( |
578 | "speculative-execution" , "SpeculativeExecutionPass" , |
579 | [](bool OnlyIfDivergentTarget) { |
580 | return SpeculativeExecutionPass(OnlyIfDivergentTarget); |
581 | }, |
582 | parseSpeculativeExecutionPassOptions, "only-if-divergent-target" ) |
583 | FUNCTION_PASS_WITH_PARAMS( |
584 | "sroa" , "SROAPass" , |
585 | [](SROAOptions PreserveCFG) { return SROAPass(PreserveCFG); }, |
586 | parseSROAOptions, "preserve-cfg;modify-cfg" ) |
587 | FUNCTION_PASS_WITH_PARAMS( |
588 | "win-eh-prepare" , "WinEHPreparePass" , |
589 | [](bool DemoteCatchSwitchPHIOnly) { |
590 | return WinEHPreparePass(DemoteCatchSwitchPHIOnly); |
591 | }, |
592 | parseWinEHPrepareOptions, "demote-catchswitch-only" ) |
593 | #undef FUNCTION_PASS_WITH_PARAMS |
594 | |
595 | #ifndef LOOPNEST_PASS |
596 | #define LOOPNEST_PASS(NAME, CREATE_PASS) |
597 | #endif |
598 | LOOPNEST_PASS("loop-flatten" , LoopFlattenPass()) |
599 | LOOPNEST_PASS("loop-interchange" , LoopInterchangePass()) |
600 | LOOPNEST_PASS("loop-unroll-and-jam" , LoopUnrollAndJamPass()) |
601 | LOOPNEST_PASS("no-op-loopnest" , NoOpLoopNestPass()) |
602 | #undef LOOPNEST_PASS |
603 | |
604 | #ifndef LOOP_ANALYSIS |
605 | #define LOOP_ANALYSIS(NAME, CREATE_PASS) |
606 | #endif |
607 | LOOP_ANALYSIS("ddg" , DDGAnalysis()) |
608 | LOOP_ANALYSIS("iv-users" , IVUsersAnalysis()) |
609 | LOOP_ANALYSIS("no-op-loop" , NoOpLoopAnalysis()) |
610 | LOOP_ANALYSIS("pass-instrumentation" , PassInstrumentationAnalysis(PIC)) |
611 | LOOP_ANALYSIS("should-run-extra-simple-loop-unswitch" , |
612 | ShouldRunExtraSimpleLoopUnswitch()) |
613 | |
614 | #undef LOOP_ANALYSIS |
615 | |
616 | #ifndef LOOP_PASS |
617 | #define LOOP_PASS(NAME, CREATE_PASS) |
618 | #endif |
619 | LOOP_PASS("canon-freeze" , CanonicalizeFreezeInLoopsPass()) |
620 | LOOP_PASS("dot-ddg" , DDGDotPrinterPass()) |
621 | LOOP_PASS("guard-widening" , GuardWideningPass()) |
622 | LOOP_PASS("indvars" , IndVarSimplifyPass()) |
623 | LOOP_PASS("invalidate<all>" , InvalidateAllAnalysesPass()) |
624 | LOOP_PASS("loop-bound-split" , LoopBoundSplitPass()) |
625 | LOOP_PASS("loop-deletion" , LoopDeletionPass()) |
626 | LOOP_PASS("loop-idiom" , LoopIdiomRecognizePass()) |
627 | LOOP_PASS("loop-idiom-vectorize" , LoopIdiomVectorizePass()) |
628 | LOOP_PASS("loop-instsimplify" , LoopInstSimplifyPass()) |
629 | LOOP_PASS("loop-predication" , LoopPredicationPass()) |
630 | LOOP_PASS("loop-reduce" , LoopStrengthReducePass()) |
631 | LOOP_PASS("loop-simplifycfg" , LoopSimplifyCFGPass()) |
632 | LOOP_PASS("loop-unroll-full" , LoopFullUnrollPass()) |
633 | LOOP_PASS("loop-versioning-licm" , LoopVersioningLICMPass()) |
634 | LOOP_PASS("no-op-loop" , NoOpLoopPass()) |
635 | LOOP_PASS("print" , PrintLoopPass(dbgs())) |
636 | LOOP_PASS("print<ddg>" , DDGAnalysisPrinterPass(dbgs())) |
637 | LOOP_PASS("print<iv-users>" , IVUsersPrinterPass(dbgs())) |
638 | LOOP_PASS("print<loop-cache-cost>" , LoopCachePrinterPass(dbgs())) |
639 | LOOP_PASS("print<loopnest>" , LoopNestPrinterPass(dbgs())) |
640 | #undef LOOP_PASS |
641 | |
642 | #ifndef LOOP_PASS_WITH_PARAMS |
643 | #define LOOP_PASS_WITH_PARAMS(NAME, CLASS, CREATE_PASS, PARSER, PARAMS) |
644 | #endif |
645 | LOOP_PASS_WITH_PARAMS( |
646 | "licm" , "LICMPass" , [](LICMOptions Params) { return LICMPass(Params); }, |
647 | parseLICMOptions, "allowspeculation" ) |
648 | LOOP_PASS_WITH_PARAMS( |
649 | "lnicm" , "LNICMPass" , [](LICMOptions Params) { return LNICMPass(Params); }, |
650 | parseLICMOptions, "allowspeculation" ) |
651 | LOOP_PASS_WITH_PARAMS( |
652 | "loop-rotate" , "LoopRotatePass" , |
653 | [](std::pair<bool, bool> Params) { |
654 | return LoopRotatePass(Params.first, Params.second); |
655 | }, |
656 | parseLoopRotateOptions, |
657 | "no-header-duplication;header-duplication;" |
658 | "no-prepare-for-lto;prepare-for-lto" ) |
659 | LOOP_PASS_WITH_PARAMS( |
660 | "simple-loop-unswitch" , "SimpleLoopUnswitchPass" , |
661 | [](std::pair<bool, bool> Params) { |
662 | return SimpleLoopUnswitchPass(Params.first, Params.second); |
663 | }, |
664 | parseLoopUnswitchOptions, "nontrivial;no-nontrivial;trivial;no-trivial" ) |
665 | #undef LOOP_PASS_WITH_PARAMS |
666 | |