MachinePassRegistry.def 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. //===- MachinePassRegistry.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 for target-independent
  10. // code generator.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. // NOTE: NO INCLUDE GUARD DESIRED!
  14. #ifndef MODULE_ANALYSIS
  15. #define MODULE_ANALYSIS(NAME, PASS_NAME, CONSTRUCTOR)
  16. #endif
  17. MODULE_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis, (PIC))
  18. #undef MODULE_ANALYSIS
  19. #ifndef MODULE_PASS
  20. #define MODULE_PASS(NAME, PASS_NAME, CONSTRUCTOR)
  21. #endif
  22. MODULE_PASS("pre-isel-intrinsic-lowering", PreISelIntrinsicLoweringPass, ())
  23. #undef MODULE_PASS
  24. #ifndef FUNCTION_ANALYSIS
  25. #define FUNCTION_ANALYSIS(NAME, PASS_NAME, CONSTRUCTOR)
  26. #endif
  27. FUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis, (PIC))
  28. FUNCTION_ANALYSIS("targetir", TargetIRAnalysis, (std::move(TM.getTargetIRAnalysis())))
  29. #undef FUNCTION_ANALYSIS
  30. #ifndef FUNCTION_PASS
  31. #define FUNCTION_PASS(NAME, PASS_NAME, CONSTRUCTOR)
  32. #endif
  33. FUNCTION_PASS("mergeicmps", MergeICmpsPass, ())
  34. FUNCTION_PASS("lower-constant-intrinsics", LowerConstantIntrinsicsPass, ())
  35. FUNCTION_PASS("unreachableblockelim", UnreachableBlockElimPass, ())
  36. FUNCTION_PASS("consthoist", ConstantHoistingPass, ())
  37. FUNCTION_PASS("replace-with-veclib", ReplaceWithVeclib, ())
  38. FUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass, ())
  39. FUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass, (false))
  40. FUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass, (true))
  41. FUNCTION_PASS("expand-reductions", ExpandReductionsPass, ())
  42. FUNCTION_PASS("expandvp", ExpandVectorPredicationPass, ())
  43. FUNCTION_PASS("lowerinvoke", LowerInvokePass, ())
  44. FUNCTION_PASS("scalarize-masked-mem-intrin", ScalarizeMaskedMemIntrinPass, ())
  45. FUNCTION_PASS("verify", VerifierPass, ())
  46. #undef FUNCTION_PASS
  47. #ifndef LOOP_PASS
  48. #define LOOP_PASS(NAME, PASS_NAME, CONSTRUCTOR)
  49. #endif
  50. LOOP_PASS("loop-reduce", LoopStrengthReducePass, ())
  51. #undef LOOP_PASS
  52. #ifndef MACHINE_MODULE_PASS
  53. #define MACHINE_MODULE_PASS(NAME, PASS_NAME, CONSTRUCTOR)
  54. #endif
  55. #undef MACHINE_MODULE_PASS
  56. #ifndef MACHINE_FUNCTION_ANALYSIS
  57. #define MACHINE_FUNCTION_ANALYSIS(NAME, PASS_NAME, CONSTRUCTOR)
  58. #endif
  59. MACHINE_FUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis, (PIC))
  60. // LiveVariables currently requires pure SSA form.
  61. // FIXME: Once TwoAddressInstruction pass no longer uses kill flags,
  62. // LiveVariables can be removed completely, and LiveIntervals can be directly
  63. // computed. (We still either need to regenerate kill flags after regalloc, or
  64. // preferably fix the scavenger to not depend on them).
  65. // MACHINE_FUNCTION_ANALYSIS("live-vars", LiveVariablesAnalysis())
  66. // MACHINE_FUNCTION_ANALYSIS("live-stacks", LiveStacksPass())
  67. // MACHINE_FUNCTION_ANALYSIS("slot-indexes", SlotIndexesAnalysis())
  68. // MACHINE_FUNCTION_ANALYSIS("edge-bundles", EdgeBundlesAnalysis())
  69. // MACHINE_FUNCTION_ANALYSIS("lazy-machine-bfi", LazyMachineBlockFrequencyInfoAnalysis())
  70. // MACHINE_FUNCTION_ANALYSIS("machine-bfi", MachineBlockFrequencyInfoAnalysis())
  71. // MACHINE_FUNCTION_ANALYSIS("machine-loops", MachineLoopInfoAnalysis())
  72. // MACHINE_FUNCTION_ANALYSIS("machine-dom-frontier", MachineDominanceFrontierAnalysis())
  73. // MACHINE_FUNCTION_ANALYSIS("machine-dom-tree", MachineDominatorTreeAnalysis())
  74. // MACHINE_FUNCTION_ANALYSIS("machine-ore", MachineOptimizationRemarkEmitterPassAnalysis())
  75. // MACHINE_FUNCTION_ANALYSIS("machine-post-dom-tree", MachinePostDominatorTreeAnalysis())
  76. // MACHINE_FUNCTION_ANALYSIS("machine-region-info", MachineRegionInfoPassAnalysis())
  77. // MACHINE_FUNCTION_ANALYSIS("machine-trace-metrics", MachineTraceMetricsAnalysis())
  78. // MACHINE_FUNCTION_ANALYSIS("reaching-def", ReachingDefAnalysisAnalysis())
  79. // MACHINE_FUNCTION_ANALYSIS("live-reg-matrix", LiveRegMatrixAnalysis())
  80. // MACHINE_FUNCTION_ANALYSIS("gc-analysis", GCMachineCodeAnalysisPass())
  81. #undef MACHINE_FUNCTION_ANALYSIS
  82. #ifndef MACHINE_FUNCTION_PASS
  83. #define MACHINE_FUNCTION_PASS(NAME, PASS_NAME, CONSTRUCTOR)
  84. #endif
  85. // MACHINE_FUNCTION_PASS("mir-printer", PrintMIRPass, ())
  86. // MACHINE_FUNCTION_PASS("free-machine-function", FreeMachineFunctionPass, ())
  87. #undef MACHINE_FUNCTION_PASS
  88. // After a pass is converted to new pass manager, its entry should be moved from
  89. // dummy table to the normal one. For example, for a machine function pass,
  90. // DUMMY_MACHINE_FUNCTION_PASS to MACHINE_FUNCTION_PASS.
  91. #ifndef DUMMY_FUNCTION_PASS
  92. #define DUMMY_FUNCTION_PASS(NAME, PASS_NAME, CONSTRUCTOR)
  93. #endif
  94. DUMMY_FUNCTION_PASS("expandmemcmp", ExpandMemCmpPass, ())
  95. DUMMY_FUNCTION_PASS("gc-lowering", GCLoweringPass, ())
  96. DUMMY_FUNCTION_PASS("shadow-stack-gc-lowering", ShadowStackGCLoweringPass, ())
  97. DUMMY_FUNCTION_PASS("sjljehprepare", SjLjEHPreparePass, ())
  98. DUMMY_FUNCTION_PASS("dwarfehprepare", DwarfEHPass, ())
  99. DUMMY_FUNCTION_PASS("winehprepare", WinEHPass, ())
  100. DUMMY_FUNCTION_PASS("wasmehprepare", WasmEHPass, ())
  101. DUMMY_FUNCTION_PASS("codegenprepare", CodeGenPreparePass, ())
  102. DUMMY_FUNCTION_PASS("safe-stack", SafeStackPass, ())
  103. DUMMY_FUNCTION_PASS("stack-protector", StackProtectorPass, ())
  104. DUMMY_FUNCTION_PASS("atomic-expand", AtomicExpandPass, ())
  105. DUMMY_FUNCTION_PASS("interleaved-access", InterleavedAccessPass, ())
  106. DUMMY_FUNCTION_PASS("indirectbr-expand", IndirectBrExpandPass, ())
  107. DUMMY_FUNCTION_PASS("cfguard-dispatch", CFGuardDispatchPass, ())
  108. DUMMY_FUNCTION_PASS("cfguard-check", CFGuardCheckPass, ())
  109. DUMMY_FUNCTION_PASS("gc-info-printer", GCInfoPrinterPass, ())
  110. #undef DUMMY_FUNCTION_PASS
  111. #ifndef DUMMY_MODULE_PASS
  112. #define DUMMY_MODULE_PASS(NAME, PASS_NAME, CONSTRUCTOR)
  113. #endif
  114. DUMMY_MODULE_PASS("lower-emutls", LowerEmuTLSPass, ())
  115. #undef DUMMY_MODULE_PASS
  116. #ifndef DUMMY_MACHINE_MODULE_PASS
  117. #define DUMMY_MACHINE_MODULE_PASS(NAME, PASS_NAME, CONSTRUCTOR)
  118. #endif
  119. DUMMY_MACHINE_MODULE_PASS("machine-outliner", MachineOutlinerPass, ())
  120. #undef DUMMY_MACHINE_MODULE_PASS
  121. #ifndef DUMMY_MACHINE_FUNCTION_PASS
  122. #define DUMMY_MACHINE_FUNCTION_PASS(NAME, PASS_NAME, CONSTRUCTOR)
  123. #endif
  124. DUMMY_MACHINE_FUNCTION_PASS("mir-printer", PrintMIRPass, ())
  125. DUMMY_MACHINE_FUNCTION_PASS("free-machine-function", FreeMachineFunctionPass, ())
  126. DUMMY_MACHINE_FUNCTION_PASS("finalize-isel", FinalizeISelPass, ())
  127. DUMMY_MACHINE_FUNCTION_PASS("localstackalloc", LocalStackSlotPass, ())
  128. DUMMY_MACHINE_FUNCTION_PASS("shrink-wrap", ShrinkWrapPass, ())
  129. DUMMY_MACHINE_FUNCTION_PASS("prologepilog", PrologEpilogInserterPass, ())
  130. DUMMY_MACHINE_FUNCTION_PASS("postrapseudos", ExpandPostRAPseudosPass, ())
  131. DUMMY_MACHINE_FUNCTION_PASS("implicit-null-checks", ImplicitNullChecksPass, ())
  132. DUMMY_MACHINE_FUNCTION_PASS("postmisched", PostMachineSchedulerPass, ())
  133. DUMMY_MACHINE_FUNCTION_PASS("machine-scheduler", MachineSchedulerPass, ())
  134. DUMMY_MACHINE_FUNCTION_PASS("machine-cp", MachineCopyPropagationPass, ())
  135. DUMMY_MACHINE_FUNCTION_PASS("post-RA-sched", PostRASchedulerPass, ())
  136. DUMMY_MACHINE_FUNCTION_PASS("fentry-insert", FEntryInserterPass, ())
  137. DUMMY_MACHINE_FUNCTION_PASS("xray-instrumentation", XRayInstrumentationPass, ())
  138. DUMMY_MACHINE_FUNCTION_PASS("patchable-function", PatchableFunctionPass, ())
  139. DUMMY_MACHINE_FUNCTION_PASS("reg-usage-propagation", RegUsageInfoPropagationPass, ())
  140. DUMMY_MACHINE_FUNCTION_PASS("reg-usage-collector", RegUsageInfoCollectorPass, ())
  141. DUMMY_MACHINE_FUNCTION_PASS("funclet-layout", FuncletLayoutPass, ())
  142. DUMMY_MACHINE_FUNCTION_PASS("stackmap-liveness", StackMapLivenessPass, ())
  143. DUMMY_MACHINE_FUNCTION_PASS("removeredundantdebugvalues", RemoveRedundantDebugValuesPass, ())
  144. DUMMY_MACHINE_FUNCTION_PASS("livedebugvalues", LiveDebugValuesPass, ())
  145. DUMMY_MACHINE_FUNCTION_PASS("early-tailduplication", EarlyTailDuplicatePass, ())
  146. DUMMY_MACHINE_FUNCTION_PASS("opt-phis", OptimizePHIsPass, ())
  147. DUMMY_MACHINE_FUNCTION_PASS("stack-coloring", StackColoringPass, ())
  148. DUMMY_MACHINE_FUNCTION_PASS("dead-mi-elimination", DeadMachineInstructionElimPass, ())
  149. DUMMY_MACHINE_FUNCTION_PASS("early-machinelicm", EarlyMachineLICMPass, ())
  150. DUMMY_MACHINE_FUNCTION_PASS("machinelicm", MachineLICMPass, ())
  151. DUMMY_MACHINE_FUNCTION_PASS("machine-cse", MachineCSEPass, ())
  152. DUMMY_MACHINE_FUNCTION_PASS("machine-sink", MachineSinkingPass, ())
  153. DUMMY_MACHINE_FUNCTION_PASS("postra-machine-sink", PostRAMachineSinkingPass, ())
  154. DUMMY_MACHINE_FUNCTION_PASS("peephole-opt", PeepholeOptimizerPass, ())
  155. DUMMY_MACHINE_FUNCTION_PASS("regalloc", RegAllocPass, ())
  156. DUMMY_MACHINE_FUNCTION_PASS("virtregrewriter", VirtRegRewriterPass, ())
  157. DUMMY_MACHINE_FUNCTION_PASS("stack-slot-coloring", StackSlotColoringPass, ())
  158. DUMMY_MACHINE_FUNCTION_PASS("phi-node-elimination", PHIEliminationPass, ())
  159. DUMMY_MACHINE_FUNCTION_PASS("twoaddressinstruction", TwoAddressInstructionPass, ())
  160. DUMMY_MACHINE_FUNCTION_PASS("detect-dead-lanes", DetectDeadLanesPass, ())
  161. DUMMY_MACHINE_FUNCTION_PASS("processimpdefs", ProcessImplicitDefsPass, ())
  162. DUMMY_MACHINE_FUNCTION_PASS("liveintervals", LiveIntervalsPass, ())
  163. DUMMY_MACHINE_FUNCTION_PASS("simple-register-coalescing", RegisterCoalescerPass, ())
  164. DUMMY_MACHINE_FUNCTION_PASS("rename-independent-subregs", RenameIndependentSubregsPass, ())
  165. DUMMY_MACHINE_FUNCTION_PASS("branch-folder", BranchFolderPass, ())
  166. DUMMY_MACHINE_FUNCTION_PASS("tailduplication", TailDuplicatePass, ())
  167. DUMMY_MACHINE_FUNCTION_PASS("block-placement", MachineBlockPlacementPass, ())
  168. DUMMY_MACHINE_FUNCTION_PASS("block-placement-stats", MachineBlockPlacementStatsPass, ())
  169. DUMMY_MACHINE_FUNCTION_PASS("early-ifcvt", EarlyIfConverterPass, ())
  170. DUMMY_MACHINE_FUNCTION_PASS("machine-combiner", MachineCombinerPass, ())
  171. DUMMY_MACHINE_FUNCTION_PASS("lrshrink", LiveRangeShrinkPass, ())
  172. DUMMY_MACHINE_FUNCTION_PASS("break-false-deps", BreakFalseDepsPass, ())
  173. DUMMY_MACHINE_FUNCTION_PASS("cfi-instr-inserter", CFIInstrInserterPass, ())
  174. DUMMY_MACHINE_FUNCTION_PASS("cfguard-longjmp", CFGuardLongjmpPass, ())
  175. DUMMY_MACHINE_FUNCTION_PASS("ra-basic", RABasicPass, ())
  176. DUMMY_MACHINE_FUNCTION_PASS("ra-fast", RAFastPass, ())
  177. DUMMY_MACHINE_FUNCTION_PASS("ra-greedy", RAGreedyPass, ())
  178. DUMMY_MACHINE_FUNCTION_PASS("ra-pbqp", RAPBQPPass, ())
  179. DUMMY_MACHINE_FUNCTION_PASS("legalizer", LegalizerPass, ())
  180. DUMMY_MACHINE_FUNCTION_PASS("irtranslator", IRTranslatorPass, ())
  181. DUMMY_MACHINE_FUNCTION_PASS("regbankselect", RegBankSelectPass, ())
  182. DUMMY_MACHINE_FUNCTION_PASS("instruction-select", InstructionSelectPass, ())
  183. DUMMY_MACHINE_FUNCTION_PASS("reset-machine-function", ResetMachineFunctionPass, ())
  184. DUMMY_MACHINE_FUNCTION_PASS("machineverifier", MachineVerifierPass, ())
  185. DUMMY_MACHINE_FUNCTION_PASS("machine-cycles", MachineCycleInfoWrapperPass, ())
  186. DUMMY_MACHINE_FUNCTION_PASS("print-machine-cycles", MachineCycleInfoPrinterPass, ())
  187. #undef DUMMY_MACHINE_FUNCTION_PASS