PassRegistry.def 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  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. // NOTE: NO INCLUDE GUARD DESIRED!
  16. #ifndef MODULE_ANALYSIS
  17. #define MODULE_ANALYSIS(NAME, CREATE_PASS)
  18. #endif
  19. MODULE_ANALYSIS("callgraph", CallGraphAnalysis())
  20. MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis())
  21. MODULE_ANALYSIS("module-summary", ModuleSummaryIndexAnalysis())
  22. MODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis())
  23. MODULE_ANALYSIS("profile-summary", ProfileSummaryAnalysis())
  24. MODULE_ANALYSIS("stack-safety", StackSafetyGlobalAnalysis())
  25. MODULE_ANALYSIS("verify", VerifierAnalysis())
  26. MODULE_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
  27. MODULE_ANALYSIS("asan-globals-md", ASanGlobalsMetadataAnalysis())
  28. MODULE_ANALYSIS("inline-advisor", InlineAdvisorAnalysis())
  29. MODULE_ANALYSIS("ir-similarity", IRSimilarityAnalysis())
  30. #ifndef MODULE_ALIAS_ANALYSIS
  31. #define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
  32. MODULE_ANALYSIS(NAME, CREATE_PASS)
  33. #endif
  34. MODULE_ALIAS_ANALYSIS("globals-aa", GlobalsAA())
  35. #undef MODULE_ALIAS_ANALYSIS
  36. #undef MODULE_ANALYSIS
  37. #ifndef MODULE_PASS
  38. #define MODULE_PASS(NAME, CREATE_PASS)
  39. #endif
  40. MODULE_PASS("always-inline", AlwaysInlinerPass())
  41. MODULE_PASS("attributor", AttributorPass())
  42. MODULE_PASS("annotation2metadata", Annotation2MetadataPass())
  43. MODULE_PASS("called-value-propagation", CalledValuePropagationPass())
  44. MODULE_PASS("canonicalize-aliases", CanonicalizeAliasesPass())
  45. MODULE_PASS("cg-profile", CGProfilePass())
  46. MODULE_PASS("constmerge", ConstantMergePass())
  47. MODULE_PASS("cross-dso-cfi", CrossDSOCFIPass())
  48. MODULE_PASS("deadargelim", DeadArgumentEliminationPass())
  49. MODULE_PASS("elim-avail-extern", EliminateAvailableExternallyPass())
  50. MODULE_PASS("extract-blocks", BlockExtractorPass())
  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("hwasan", HWAddressSanitizerPass(false, false))
  58. MODULE_PASS("khwasan", HWAddressSanitizerPass(true, true))
  59. MODULE_PASS("inferattrs", InferFunctionAttrsPass())
  60. MODULE_PASS("inliner-wrapper", ModuleInlinerWrapperPass())
  61. MODULE_PASS("inliner-wrapper-no-mandatory-first", ModuleInlinerWrapperPass(
  62. getInlineParams(),
  63. DebugLogging,
  64. false))
  65. MODULE_PASS("insert-gcov-profiling", GCOVProfilerPass())
  66. MODULE_PASS("instrorderfile", InstrOrderFilePass())
  67. MODULE_PASS("instrprof", InstrProfiling())
  68. MODULE_PASS("internalize", InternalizePass())
  69. MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass())
  70. MODULE_PASS("ipsccp", IPSCCPPass())
  71. MODULE_PASS("iroutliner", IROutlinerPass())
  72. MODULE_PASS("print-ir-similarity", IRSimilarityAnalysisPrinterPass(dbgs()))
  73. MODULE_PASS("loop-extract", LoopExtractorPass())
  74. MODULE_PASS("lowertypetests", LowerTypeTestsPass())
  75. MODULE_PASS("metarenamer", MetaRenamerPass())
  76. MODULE_PASS("mergefunc", MergeFunctionsPass())
  77. MODULE_PASS("name-anon-globals", NameAnonGlobalPass())
  78. MODULE_PASS("no-op-module", NoOpModulePass())
  79. MODULE_PASS("objc-arc-apelim", ObjCARCAPElimPass())
  80. MODULE_PASS("partial-inliner", PartialInlinerPass())
  81. MODULE_PASS("pgo-icall-prom", PGOIndirectCallPromotion())
  82. MODULE_PASS("pgo-instr-gen", PGOInstrumentationGen())
  83. MODULE_PASS("pgo-instr-use", PGOInstrumentationUse())
  84. MODULE_PASS("print-profile-summary", ProfileSummaryPrinterPass(dbgs()))
  85. MODULE_PASS("print-callgraph", CallGraphPrinterPass(dbgs()))
  86. MODULE_PASS("print", PrintModulePass(dbgs()))
  87. MODULE_PASS("print-lcg", LazyCallGraphPrinterPass(dbgs()))
  88. MODULE_PASS("print-lcg-dot", LazyCallGraphDOTPrinterPass(dbgs()))
  89. MODULE_PASS("print-must-be-executed-contexts", MustBeExecutedContextPrinterPass(dbgs()))
  90. MODULE_PASS("print-stack-safety", StackSafetyGlobalPrinterPass(dbgs()))
  91. MODULE_PASS("print<module-debuginfo>", ModuleDebugInfoPrinterPass(dbgs()))
  92. MODULE_PASS("rewrite-statepoints-for-gc", RewriteStatepointsForGC())
  93. MODULE_PASS("rewrite-symbols", RewriteSymbolPass())
  94. MODULE_PASS("rpo-function-attrs", ReversePostOrderFunctionAttrsPass())
  95. MODULE_PASS("sample-profile", SampleProfileLoaderPass())
  96. MODULE_PASS("scc-oz-module-inliner",
  97. buildInlinerPipeline(OptimizationLevel::Oz, ThinOrFullLTOPhase::None))
  98. MODULE_PASS("loop-extract-single", LoopExtractorPass(1))
  99. MODULE_PASS("strip", StripSymbolsPass())
  100. MODULE_PASS("strip-dead-debug-info", StripDeadDebugInfoPass())
  101. MODULE_PASS("pseudo-probe", SampleProfileProbePass(TM))
  102. MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())
  103. MODULE_PASS("strip-debug-declare", StripDebugDeclarePass())
  104. MODULE_PASS("strip-nondebug", StripNonDebugSymbolsPass())
  105. MODULE_PASS("strip-nonlinetable-debuginfo", StripNonLineTableDebugInfoPass())
  106. MODULE_PASS("synthetic-counts-propagation", SyntheticCountsPropagation())
  107. MODULE_PASS("unique-internal-linkage-names", UniqueInternalLinkageNamesPass())
  108. MODULE_PASS("verify", VerifierPass())
  109. MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass())
  110. MODULE_PASS("dfsan", DataFlowSanitizerPass())
  111. MODULE_PASS("asan-module", ModuleAddressSanitizerPass(/*CompileKernel=*/false, false, true, false))
  112. MODULE_PASS("msan-module", MemorySanitizerPass({}))
  113. MODULE_PASS("tsan-module", ThreadSanitizerPass())
  114. MODULE_PASS("kasan-module", ModuleAddressSanitizerPass(/*CompileKernel=*/true, false, true, false))
  115. MODULE_PASS("sancov-module", ModuleSanitizerCoveragePass())
  116. MODULE_PASS("memprof-module", ModuleMemProfilerPass())
  117. MODULE_PASS("poison-checking", PoisonCheckingPass())
  118. MODULE_PASS("pseudo-probe-update", PseudoProbeUpdatePass())
  119. #undef MODULE_PASS
  120. #ifndef CGSCC_ANALYSIS
  121. #define CGSCC_ANALYSIS(NAME, CREATE_PASS)
  122. #endif
  123. CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
  124. CGSCC_ANALYSIS("fam-proxy", FunctionAnalysisManagerCGSCCProxy())
  125. CGSCC_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
  126. #undef CGSCC_ANALYSIS
  127. #ifndef CGSCC_PASS
  128. #define CGSCC_PASS(NAME, CREATE_PASS)
  129. #endif
  130. CGSCC_PASS("argpromotion", ArgumentPromotionPass())
  131. CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass())
  132. CGSCC_PASS("function-attrs", PostOrderFunctionAttrsPass())
  133. CGSCC_PASS("attributor-cgscc", AttributorCGSCCPass())
  134. CGSCC_PASS("inline", InlinerPass())
  135. CGSCC_PASS("openmpopt", OpenMPOptPass())
  136. CGSCC_PASS("coro-split", CoroSplitPass())
  137. CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass())
  138. #undef CGSCC_PASS
  139. #ifndef FUNCTION_ANALYSIS
  140. #define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
  141. #endif
  142. FUNCTION_ANALYSIS("aa", AAManager())
  143. FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis())
  144. FUNCTION_ANALYSIS("block-freq", BlockFrequencyAnalysis())
  145. FUNCTION_ANALYSIS("branch-prob", BranchProbabilityAnalysis())
  146. FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis())
  147. FUNCTION_ANALYSIS("postdomtree", PostDominatorTreeAnalysis())
  148. FUNCTION_ANALYSIS("demanded-bits", DemandedBitsAnalysis())
  149. FUNCTION_ANALYSIS("domfrontier", DominanceFrontierAnalysis())
  150. FUNCTION_ANALYSIS("func-properties", FunctionPropertiesAnalysis())
  151. FUNCTION_ANALYSIS("loops", LoopAnalysis())
  152. FUNCTION_ANALYSIS("lazy-value-info", LazyValueAnalysis())
  153. FUNCTION_ANALYSIS("da", DependenceAnalysis())
  154. FUNCTION_ANALYSIS("inliner-size-estimator", InlineSizeEstimatorAnalysis())
  155. FUNCTION_ANALYSIS("memdep", MemoryDependenceAnalysis())
  156. FUNCTION_ANALYSIS("memoryssa", MemorySSAAnalysis())
  157. FUNCTION_ANALYSIS("phi-values", PhiValuesAnalysis())
  158. FUNCTION_ANALYSIS("regions", RegionInfoAnalysis())
  159. FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())
  160. FUNCTION_ANALYSIS("opt-remark-emit", OptimizationRemarkEmitterAnalysis())
  161. FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis())
  162. FUNCTION_ANALYSIS("stack-safety-local", StackSafetyAnalysis())
  163. FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
  164. FUNCTION_ANALYSIS("targetir",
  165. TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
  166. FUNCTION_ANALYSIS("verify", VerifierAnalysis())
  167. FUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
  168. #ifndef FUNCTION_ALIAS_ANALYSIS
  169. #define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
  170. FUNCTION_ANALYSIS(NAME, CREATE_PASS)
  171. #endif
  172. FUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA())
  173. FUNCTION_ALIAS_ANALYSIS("cfl-anders-aa", CFLAndersAA())
  174. FUNCTION_ALIAS_ANALYSIS("cfl-steens-aa", CFLSteensAA())
  175. FUNCTION_ALIAS_ANALYSIS("objc-arc-aa", objcarc::ObjCARCAA())
  176. FUNCTION_ALIAS_ANALYSIS("scev-aa", SCEVAA())
  177. FUNCTION_ALIAS_ANALYSIS("scoped-noalias-aa", ScopedNoAliasAA())
  178. FUNCTION_ALIAS_ANALYSIS("tbaa", TypeBasedAA())
  179. #undef FUNCTION_ALIAS_ANALYSIS
  180. #undef FUNCTION_ANALYSIS
  181. #ifndef FUNCTION_PASS
  182. #define FUNCTION_PASS(NAME, CREATE_PASS)
  183. #endif
  184. FUNCTION_PASS("aa-eval", AAEvaluator())
  185. FUNCTION_PASS("adce", ADCEPass())
  186. FUNCTION_PASS("add-discriminators", AddDiscriminatorsPass())
  187. FUNCTION_PASS("aggressive-instcombine", AggressiveInstCombinePass())
  188. FUNCTION_PASS("assume-builder", AssumeBuilderPass())
  189. FUNCTION_PASS("assume-simplify", AssumeSimplifyPass())
  190. FUNCTION_PASS("alignment-from-assumptions", AlignmentFromAssumptionsPass())
  191. FUNCTION_PASS("annotation-remarks", AnnotationRemarksPass())
  192. FUNCTION_PASS("bdce", BDCEPass())
  193. FUNCTION_PASS("bounds-checking", BoundsCheckingPass())
  194. FUNCTION_PASS("break-crit-edges", BreakCriticalEdgesPass())
  195. FUNCTION_PASS("callsite-splitting", CallSiteSplittingPass())
  196. FUNCTION_PASS("consthoist", ConstantHoistingPass())
  197. FUNCTION_PASS("constraint-elimination", ConstraintEliminationPass())
  198. FUNCTION_PASS("chr", ControlHeightReductionPass())
  199. FUNCTION_PASS("coro-early", CoroEarlyPass())
  200. FUNCTION_PASS("coro-elide", CoroElidePass())
  201. FUNCTION_PASS("coro-cleanup", CoroCleanupPass())
  202. FUNCTION_PASS("correlated-propagation", CorrelatedValuePropagationPass())
  203. FUNCTION_PASS("dce", DCEPass())
  204. FUNCTION_PASS("div-rem-pairs", DivRemPairsPass())
  205. FUNCTION_PASS("dse", DSEPass())
  206. FUNCTION_PASS("dot-cfg", CFGPrinterPass())
  207. FUNCTION_PASS("dot-cfg-only", CFGOnlyPrinterPass())
  208. FUNCTION_PASS("early-cse", EarlyCSEPass(/*UseMemorySSA=*/false))
  209. FUNCTION_PASS("early-cse-memssa", EarlyCSEPass(/*UseMemorySSA=*/true))
  210. FUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/false))
  211. FUNCTION_PASS("fix-irreducible", FixIrreduciblePass())
  212. FUNCTION_PASS("make-guards-explicit", MakeGuardsExplicitPass())
  213. FUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/true))
  214. FUNCTION_PASS("gvn-hoist", GVNHoistPass())
  215. FUNCTION_PASS("gvn-sink", GVNSinkPass())
  216. FUNCTION_PASS("helloworld", HelloWorldPass())
  217. FUNCTION_PASS("infer-address-spaces", InferAddressSpacesPass())
  218. FUNCTION_PASS("instcombine", InstCombinePass())
  219. FUNCTION_PASS("instcount", InstCountPass())
  220. FUNCTION_PASS("instsimplify", InstSimplifyPass())
  221. FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())
  222. FUNCTION_PASS("irce", IRCEPass())
  223. FUNCTION_PASS("float2int", Float2IntPass())
  224. FUNCTION_PASS("no-op-function", NoOpFunctionPass())
  225. FUNCTION_PASS("libcalls-shrinkwrap", LibCallsShrinkWrapPass())
  226. FUNCTION_PASS("lint", LintPass())
  227. FUNCTION_PASS("inject-tli-mappings", InjectTLIMappings())
  228. FUNCTION_PASS("instnamer", InstructionNamerPass())
  229. FUNCTION_PASS("loweratomic", LowerAtomicPass())
  230. FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
  231. FUNCTION_PASS("lower-guard-intrinsic", LowerGuardIntrinsicPass())
  232. FUNCTION_PASS("lower-constant-intrinsics", LowerConstantIntrinsicsPass())
  233. FUNCTION_PASS("lower-matrix-intrinsics", LowerMatrixIntrinsicsPass())
  234. FUNCTION_PASS("lower-matrix-intrinsics-minimal", LowerMatrixIntrinsicsPass(true))
  235. FUNCTION_PASS("lower-widenable-condition", LowerWidenableConditionPass())
  236. FUNCTION_PASS("guard-widening", GuardWideningPass())
  237. FUNCTION_PASS("load-store-vectorizer", LoadStoreVectorizerPass())
  238. FUNCTION_PASS("loop-simplify", LoopSimplifyPass())
  239. FUNCTION_PASS("loop-sink", LoopSinkPass())
  240. FUNCTION_PASS("loop-unroll-and-jam", LoopUnrollAndJamPass())
  241. FUNCTION_PASS("loop-flatten", LoopFlattenPass())
  242. FUNCTION_PASS("lowerinvoke", LowerInvokePass())
  243. FUNCTION_PASS("lowerswitch", LowerSwitchPass())
  244. FUNCTION_PASS("mem2reg", PromotePass())
  245. FUNCTION_PASS("memcpyopt", MemCpyOptPass())
  246. FUNCTION_PASS("mergeicmps", MergeICmpsPass())
  247. FUNCTION_PASS("mergereturn", UnifyFunctionExitNodesPass())
  248. FUNCTION_PASS("nary-reassociate", NaryReassociatePass())
  249. FUNCTION_PASS("newgvn", NewGVNPass())
  250. FUNCTION_PASS("jump-threading", JumpThreadingPass())
  251. FUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass())
  252. FUNCTION_PASS("lcssa", LCSSAPass())
  253. FUNCTION_PASS("loop-data-prefetch", LoopDataPrefetchPass())
  254. FUNCTION_PASS("loop-load-elim", LoopLoadEliminationPass())
  255. FUNCTION_PASS("loop-fusion", LoopFusePass())
  256. FUNCTION_PASS("loop-distribute", LoopDistributePass())
  257. FUNCTION_PASS("loop-versioning", LoopVersioningPass())
  258. FUNCTION_PASS("objc-arc", ObjCARCOptPass())
  259. FUNCTION_PASS("objc-arc-contract", ObjCARCContractPass())
  260. FUNCTION_PASS("objc-arc-expand", ObjCARCExpandPass())
  261. FUNCTION_PASS("pgo-memop-opt", PGOMemOPSizeOpt())
  262. FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
  263. FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs()))
  264. FUNCTION_PASS("print<block-freq>", BlockFrequencyPrinterPass(dbgs()))
  265. FUNCTION_PASS("print<branch-prob>", BranchProbabilityPrinterPass(dbgs()))
  266. FUNCTION_PASS("print<da>", DependenceAnalysisPrinterPass(dbgs()))
  267. FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs()))
  268. FUNCTION_PASS("print<postdomtree>", PostDominatorTreePrinterPass(dbgs()))
  269. FUNCTION_PASS("print<delinearization>", DelinearizationPrinterPass(dbgs()))
  270. FUNCTION_PASS("print<demanded-bits>", DemandedBitsPrinterPass(dbgs()))
  271. FUNCTION_PASS("print<domfrontier>", DominanceFrontierPrinterPass(dbgs()))
  272. FUNCTION_PASS("print<func-properties>", FunctionPropertiesPrinterPass(dbgs()))
  273. FUNCTION_PASS("print<inline-cost>", InlineCostAnnotationPrinterPass(dbgs()))
  274. FUNCTION_PASS("print<inliner-size-estimator>",
  275. InlineSizeEstimatorAnalysisPrinterPass(dbgs()))
  276. FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs()))
  277. FUNCTION_PASS("print<memoryssa>", MemorySSAPrinterPass(dbgs()))
  278. FUNCTION_PASS("print<phi-values>", PhiValuesPrinterPass(dbgs()))
  279. FUNCTION_PASS("print<regions>", RegionInfoPrinterPass(dbgs()))
  280. FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs()))
  281. FUNCTION_PASS("print<stack-safety-local>", StackSafetyPrinterPass(dbgs()))
  282. // TODO: rename to print<foo> after NPM switch
  283. FUNCTION_PASS("print-alias-sets", AliasSetsPrinterPass(dbgs()))
  284. FUNCTION_PASS("print-predicateinfo", PredicateInfoPrinterPass(dbgs()))
  285. FUNCTION_PASS("print-mustexecute", MustExecutePrinterPass(dbgs()))
  286. FUNCTION_PASS("print-memderefs", MemDerefPrinterPass(dbgs()))
  287. FUNCTION_PASS("reassociate", ReassociatePass())
  288. FUNCTION_PASS("redundant-dbg-inst-elim", RedundantDbgInstEliminationPass())
  289. FUNCTION_PASS("reg2mem", RegToMemPass())
  290. FUNCTION_PASS("scalarize-masked-mem-intrin", ScalarizeMaskedMemIntrinPass())
  291. FUNCTION_PASS("scalarizer", ScalarizerPass())
  292. FUNCTION_PASS("separate-const-offset-from-gep", SeparateConstOffsetFromGEPPass())
  293. FUNCTION_PASS("sccp", SCCPPass())
  294. FUNCTION_PASS("simplifycfg", SimplifyCFGPass())
  295. FUNCTION_PASS("sink", SinkingPass())
  296. FUNCTION_PASS("slp-vectorizer", SLPVectorizerPass())
  297. FUNCTION_PASS("slsr", StraightLineStrengthReducePass())
  298. FUNCTION_PASS("speculative-execution", SpeculativeExecutionPass())
  299. FUNCTION_PASS("spec-phis", SpeculateAroundPHIsPass())
  300. FUNCTION_PASS("sroa", SROA())
  301. FUNCTION_PASS("strip-gc-relocates", StripGCRelocates())
  302. FUNCTION_PASS("structurizecfg", StructurizeCFGPass())
  303. FUNCTION_PASS("tailcallelim", TailCallElimPass())
  304. FUNCTION_PASS("unify-loop-exits", UnifyLoopExitsPass())
  305. FUNCTION_PASS("vector-combine", VectorCombinePass())
  306. FUNCTION_PASS("verify", VerifierPass())
  307. FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass())
  308. FUNCTION_PASS("verify<loops>", LoopVerifierPass())
  309. FUNCTION_PASS("verify<memoryssa>", MemorySSAVerifierPass())
  310. FUNCTION_PASS("verify<regions>", RegionInfoVerifierPass())
  311. FUNCTION_PASS("verify<safepoint-ir>", SafepointIRVerifierPass())
  312. FUNCTION_PASS("verify<scalar-evolution>", ScalarEvolutionVerifierPass())
  313. FUNCTION_PASS("view-cfg", CFGViewerPass())
  314. FUNCTION_PASS("view-cfg-only", CFGOnlyViewerPass())
  315. FUNCTION_PASS("transform-warning", WarnMissedTransformationsPass())
  316. FUNCTION_PASS("asan", AddressSanitizerPass(false, false, false))
  317. FUNCTION_PASS("kasan", AddressSanitizerPass(true, false, false))
  318. FUNCTION_PASS("msan", MemorySanitizerPass({}))
  319. FUNCTION_PASS("kmsan", MemorySanitizerPass({0, false, /*Kernel=*/true}))
  320. FUNCTION_PASS("tsan", ThreadSanitizerPass())
  321. FUNCTION_PASS("memprof", MemProfilerPass())
  322. #undef FUNCTION_PASS
  323. #ifndef FUNCTION_PASS_WITH_PARAMS
  324. #define FUNCTION_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER)
  325. #endif
  326. FUNCTION_PASS_WITH_PARAMS("loop-unroll",
  327. [](LoopUnrollOptions Opts) {
  328. return LoopUnrollPass(Opts);
  329. },
  330. parseLoopUnrollOptions)
  331. FUNCTION_PASS_WITH_PARAMS("msan",
  332. [](MemorySanitizerOptions Opts) {
  333. return MemorySanitizerPass(Opts);
  334. },
  335. parseMSanPassOptions)
  336. FUNCTION_PASS_WITH_PARAMS("simplify-cfg",
  337. [](SimplifyCFGOptions Opts) {
  338. return SimplifyCFGPass(Opts);
  339. },
  340. parseSimplifyCFGOptions)
  341. FUNCTION_PASS_WITH_PARAMS("loop-vectorize",
  342. [](LoopVectorizeOptions Opts) {
  343. return LoopVectorizePass(Opts);
  344. },
  345. parseLoopVectorizeOptions)
  346. FUNCTION_PASS_WITH_PARAMS("mldst-motion",
  347. [](MergedLoadStoreMotionOptions Opts) {
  348. return MergedLoadStoreMotionPass(Opts);
  349. },
  350. parseMergedLoadStoreMotionOptions)
  351. FUNCTION_PASS_WITH_PARAMS("gvn",
  352. [](GVNOptions Opts) {
  353. return GVN(Opts);
  354. },
  355. parseGVNOptions)
  356. FUNCTION_PASS_WITH_PARAMS("print<stack-lifetime>",
  357. [](StackLifetime::LivenessType Type) {
  358. return StackLifetimePrinterPass(dbgs(), Type);
  359. },
  360. parseStackLifetimeOptions)
  361. #undef FUNCTION_PASS_WITH_PARAMS
  362. #ifndef LOOP_ANALYSIS
  363. #define LOOP_ANALYSIS(NAME, CREATE_PASS)
  364. #endif
  365. LOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis())
  366. LOOP_ANALYSIS("access-info", LoopAccessAnalysis())
  367. LOOP_ANALYSIS("ddg", DDGAnalysis())
  368. LOOP_ANALYSIS("iv-users", IVUsersAnalysis())
  369. LOOP_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
  370. #undef LOOP_ANALYSIS
  371. #ifndef LOOP_PASS
  372. #define LOOP_PASS(NAME, CREATE_PASS)
  373. #endif
  374. LOOP_PASS("canon-freeze", CanonicalizeFreezeInLoopsPass())
  375. LOOP_PASS("dot-ddg", DDGDotPrinterPass())
  376. LOOP_PASS("invalidate<all>", InvalidateAllAnalysesPass())
  377. LOOP_PASS("licm", LICMPass())
  378. LOOP_PASS("loop-idiom", LoopIdiomRecognizePass())
  379. LOOP_PASS("loop-instsimplify", LoopInstSimplifyPass())
  380. LOOP_PASS("loop-interchange", LoopInterchangePass())
  381. LOOP_PASS("loop-rotate", LoopRotatePass())
  382. LOOP_PASS("no-op-loop", NoOpLoopPass())
  383. LOOP_PASS("print", PrintLoopPass(dbgs()))
  384. LOOP_PASS("loop-deletion", LoopDeletionPass())
  385. LOOP_PASS("loop-simplifycfg", LoopSimplifyCFGPass())
  386. LOOP_PASS("loop-reduce", LoopStrengthReducePass())
  387. LOOP_PASS("indvars", IndVarSimplifyPass())
  388. LOOP_PASS("loop-unroll-full", LoopFullUnrollPass())
  389. LOOP_PASS("print-access-info", LoopAccessInfoPrinterPass(dbgs()))
  390. LOOP_PASS("print<ddg>", DDGAnalysisPrinterPass(dbgs()))
  391. LOOP_PASS("print<iv-users>", IVUsersPrinterPass(dbgs()))
  392. LOOP_PASS("print<loopnest>", LoopNestPrinterPass(dbgs()))
  393. LOOP_PASS("print<loop-cache-cost>", LoopCachePrinterPass(dbgs()))
  394. LOOP_PASS("loop-predication", LoopPredicationPass())
  395. LOOP_PASS("guard-widening", GuardWideningPass())
  396. LOOP_PASS("simple-loop-unswitch", SimpleLoopUnswitchPass())
  397. LOOP_PASS("loop-reroll", LoopRerollPass())
  398. LOOP_PASS("loop-versioning-licm", LoopVersioningLICMPass())
  399. #undef LOOP_PASS
  400. #ifndef LOOP_PASS_WITH_PARAMS
  401. #define LOOP_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER)
  402. #endif
  403. LOOP_PASS_WITH_PARAMS("unswitch",
  404. [](bool NonTrivial) {
  405. return SimpleLoopUnswitchPass(NonTrivial);
  406. },
  407. parseLoopUnswitchOptions)
  408. #undef LOOP_PASS_WITH_PARAMS