Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:33

0001 //===-- Passes.h - Target independent code generation passes ----*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file defines interfaces to access the target independent code generation
0010 // passes provided by the LLVM backend.
0011 //
0012 //===----------------------------------------------------------------------===//
0013 
0014 #ifndef LLVM_CODEGEN_PASSES_H
0015 #define LLVM_CODEGEN_PASSES_H
0016 
0017 #include "llvm/Support/CodeGen.h"
0018 #include "llvm/Support/Discriminator.h"
0019 #include "llvm/CodeGen/RegAllocCommon.h"
0020 
0021 #include <functional>
0022 #include <string>
0023 
0024 namespace llvm {
0025 
0026 class FunctionPass;
0027 class MachineFunction;
0028 class MachineFunctionPass;
0029 class ModulePass;
0030 class Pass;
0031 class TargetMachine;
0032 class raw_ostream;
0033 
0034 template <typename T> class IntrusiveRefCntPtr;
0035 namespace vfs {
0036 class FileSystem;
0037 } // namespace vfs
0038 
0039 } // End llvm namespace
0040 
0041 // List of target independent CodeGen pass IDs.
0042 namespace llvm {
0043 
0044   /// AtomicExpandPass - At IR level this pass replace atomic instructions with
0045   /// __atomic_* library calls, or target specific instruction which implement the
0046   /// same semantics in a way which better fits the target backend.
0047   FunctionPass *createAtomicExpandLegacyPass();
0048 
0049   /// createUnreachableBlockEliminationPass - The LLVM code generator does not
0050   /// work well with unreachable basic blocks (what live ranges make sense for a
0051   /// block that cannot be reached?).  As such, a code generator should either
0052   /// not instruction select unreachable blocks, or run this pass as its
0053   /// last LLVM modifying pass to clean up blocks that are not reachable from
0054   /// the entry block.
0055   FunctionPass *createUnreachableBlockEliminationPass();
0056 
0057   /// createGCEmptyBasicblocksPass - Empty basic blocks (basic blocks without
0058   /// real code) appear as the result of optimization passes removing
0059   /// instructions. These blocks confuscate profile analysis (e.g., basic block
0060   /// sections) since they will share the address of their fallthrough blocks.
0061   /// This pass garbage-collects such basic blocks.
0062   MachineFunctionPass *createGCEmptyBasicBlocksPass();
0063 
0064   /// createBasicBlockSections Pass - This pass assigns sections to machine
0065   /// basic blocks and is enabled with -fbasic-block-sections.
0066   MachineFunctionPass *createBasicBlockSectionsPass();
0067 
0068   MachineFunctionPass *createBasicBlockPathCloningPass();
0069 
0070   /// createMachineFunctionSplitterPass - This pass splits machine functions
0071   /// using profile information.
0072   MachineFunctionPass *createMachineFunctionSplitterPass();
0073 
0074   /// createStaticDataSplitterPass - This pass partitions a static data section
0075   /// into a hot and cold section using profile information.
0076   MachineFunctionPass *createStaticDataSplitterPass();
0077 
0078   /// MachineFunctionPrinter pass - This pass prints out the machine function to
0079   /// the given stream as a debugging tool.
0080   MachineFunctionPass *
0081   createMachineFunctionPrinterPass(raw_ostream &OS,
0082                                    const std::string &Banner ="");
0083 
0084   /// StackFramePrinter pass - This pass prints out the machine function's
0085   /// stack frame to the given stream as a debugging tool.
0086   MachineFunctionPass *createStackFrameLayoutAnalysisPass();
0087 
0088   /// MIRPrinting pass - this pass prints out the LLVM IR into the given stream
0089   /// using the MIR serialization format.
0090   MachineFunctionPass *createPrintMIRPass(raw_ostream &OS);
0091 
0092   /// This pass resets a MachineFunction when it has the FailedISel property
0093   /// as if it was just created.
0094   /// If EmitFallbackDiag is true, the pass will emit a
0095   /// DiagnosticInfoISelFallback for every MachineFunction it resets.
0096   /// If AbortOnFailedISel is true, abort compilation instead of resetting.
0097   MachineFunctionPass *createResetMachineFunctionPass(bool EmitFallbackDiag,
0098                                                       bool AbortOnFailedISel);
0099 
0100   /// createCodeGenPrepareLegacyPass - Transform the code to expose more pattern
0101   /// matching during instruction selection.
0102   FunctionPass *createCodeGenPrepareLegacyPass();
0103 
0104   /// This pass implements generation of target-specific intrinsics to support
0105   /// handling of complex number arithmetic
0106   FunctionPass *createComplexDeinterleavingPass(const TargetMachine *TM);
0107 
0108   /// AtomicExpandID -- Lowers atomic operations in terms of either cmpxchg
0109   /// load-linked/store-conditional loops.
0110   extern char &AtomicExpandID;
0111 
0112   /// MachineLoopInfo - This pass is a loop analysis pass.
0113   extern char &MachineLoopInfoID;
0114 
0115   /// MachineDominators - This pass is a machine dominators analysis pass.
0116   extern char &MachineDominatorsID;
0117 
0118   /// MachineDominanaceFrontier - This pass is a machine dominators analysis.
0119   extern char &MachineDominanceFrontierID;
0120 
0121   /// MachineRegionInfo - This pass computes SESE regions for machine functions.
0122   extern char &MachineRegionInfoPassID;
0123 
0124   /// EdgeBundles analysis - Bundle machine CFG edges.
0125   extern char &EdgeBundlesWrapperLegacyID;
0126 
0127   /// LiveVariables pass - This pass computes the set of blocks in which each
0128   /// variable is life and sets machine operand kill flags.
0129   extern char &LiveVariablesID;
0130 
0131   /// PHIElimination - This pass eliminates machine instruction PHI nodes
0132   /// by inserting copy instructions.  This destroys SSA information, but is the
0133   /// desired input for some register allocators.  This pass is "required" by
0134   /// these register allocator like this: AU.addRequiredID(PHIEliminationID);
0135   extern char &PHIEliminationID;
0136 
0137   /// LiveIntervals - This analysis keeps track of the live ranges of virtual
0138   /// and physical registers.
0139   extern char &LiveIntervalsID;
0140 
0141   /// LiveStacks pass. An analysis keeping track of the liveness of stack slots.
0142   extern char &LiveStacksID;
0143 
0144   /// TwoAddressInstruction - This pass reduces two-address instructions to
0145   /// use two operands. This destroys SSA information but it is desired by
0146   /// register allocators.
0147   extern char &TwoAddressInstructionPassID;
0148 
0149   /// ProcessImpicitDefs pass - This pass removes IMPLICIT_DEFs.
0150   extern char &ProcessImplicitDefsID;
0151 
0152   /// RegisterCoalescer - This pass merges live ranges to eliminate copies.
0153   extern char &RegisterCoalescerID;
0154 
0155   /// MachineScheduler - This pass schedules machine instructions.
0156   extern char &MachineSchedulerID;
0157 
0158   /// PostMachineScheduler - This pass schedules machine instructions postRA.
0159   extern char &PostMachineSchedulerID;
0160 
0161   /// SpillPlacement analysis. Suggest optimal placement of spill code between
0162   /// basic blocks.
0163   extern char &SpillPlacementID;
0164 
0165   /// ShrinkWrap pass. Look for the best place to insert save and restore
0166   // instruction and update the MachineFunctionInfo with that information.
0167   extern char &ShrinkWrapID;
0168 
0169   /// LiveRangeShrink pass. Move instruction close to its definition to shrink
0170   /// the definition's live range.
0171   extern char &LiveRangeShrinkID;
0172 
0173   /// Greedy register allocator.
0174   extern char &RAGreedyID;
0175 
0176   /// Basic register allocator.
0177   extern char &RABasicID;
0178 
0179   /// VirtRegRewriter pass. Rewrite virtual registers to physical registers as
0180   /// assigned in VirtRegMap.
0181   extern char &VirtRegRewriterID;
0182   FunctionPass *createVirtRegRewriter(bool ClearVirtRegs = true);
0183 
0184   /// UnreachableMachineBlockElimination - This pass removes unreachable
0185   /// machine basic blocks.
0186   extern char &UnreachableMachineBlockElimID;
0187 
0188   /// DeadMachineInstructionElim - This pass removes dead machine instructions.
0189   extern char &DeadMachineInstructionElimID;
0190 
0191   /// This pass adds dead/undef flags after analyzing subregister lanes.
0192   extern char &DetectDeadLanesID;
0193 
0194   /// This pass perform post-ra machine sink for COPY instructions.
0195   extern char &PostRAMachineSinkingID;
0196 
0197   /// This pass adds flow sensitive discriminators.
0198   extern char &MIRAddFSDiscriminatorsID;
0199 
0200   /// This pass reads flow sensitive profile.
0201   extern char &MIRProfileLoaderPassID;
0202 
0203   // This pass gives undef values a Pseudo Instruction definition for
0204   // Instructions to ensure early-clobber is followed when using the greedy
0205   // register allocator.
0206   extern char &InitUndefID;
0207 
0208   /// FastRegisterAllocation Pass - This pass register allocates as fast as
0209   /// possible. It is best suited for debug code where live ranges are short.
0210   ///
0211   FunctionPass *createFastRegisterAllocator();
0212   FunctionPass *createFastRegisterAllocator(RegAllocFilterFunc F,
0213                                             bool ClearVirtRegs);
0214 
0215   /// BasicRegisterAllocation Pass - This pass implements a degenerate global
0216   /// register allocator using the basic regalloc framework.
0217   ///
0218   FunctionPass *createBasicRegisterAllocator();
0219   FunctionPass *createBasicRegisterAllocator(RegAllocFilterFunc F);
0220 
0221   /// Greedy register allocation pass - This pass implements a global register
0222   /// allocator for optimized builds.
0223   ///
0224   FunctionPass *createGreedyRegisterAllocator();
0225   FunctionPass *createGreedyRegisterAllocator(RegAllocFilterFunc F);
0226 
0227   /// PBQPRegisterAllocation Pass - This pass implements the Partitioned Boolean
0228   /// Quadratic Prograaming (PBQP) based register allocator.
0229   ///
0230   FunctionPass *createDefaultPBQPRegisterAllocator();
0231 
0232   /// PrologEpilogCodeInserter - This pass inserts prolog and epilog code,
0233   /// and eliminates abstract frame references.
0234   extern char &PrologEpilogCodeInserterID;
0235   MachineFunctionPass *createPrologEpilogInserterPass();
0236 
0237   /// ExpandPostRAPseudos - This pass expands pseudo instructions after
0238   /// register allocation.
0239   extern char &ExpandPostRAPseudosID;
0240 
0241   /// PostRAHazardRecognizer - This pass runs the post-ra hazard
0242   /// recognizer.
0243   extern char &PostRAHazardRecognizerID;
0244 
0245   /// PostRAScheduler - This pass performs post register allocation
0246   /// scheduling.
0247   extern char &PostRASchedulerID;
0248 
0249   /// BranchFolding - This pass performs machine code CFG based
0250   /// optimizations to delete branches to branches, eliminate branches to
0251   /// successor blocks (creating fall throughs), and eliminating branches over
0252   /// branches.
0253   extern char &BranchFolderPassID;
0254 
0255   /// BranchRelaxation - This pass replaces branches that need to jump further
0256   /// than is supported by a branch instruction.
0257   extern char &BranchRelaxationPassID;
0258 
0259   /// MachineFunctionPrinterPass - This pass prints out MachineInstr's.
0260   extern char &MachineFunctionPrinterPassID;
0261 
0262   /// MIRPrintingPass - this pass prints out the LLVM IR using the MIR
0263   /// serialization format.
0264   extern char &MIRPrintingPassID;
0265 
0266   /// TailDuplicate - Duplicate blocks with unconditional branches
0267   /// into tails of their predecessors.
0268   extern char &TailDuplicateLegacyID;
0269 
0270   /// Duplicate blocks with unconditional branches into tails of their
0271   /// predecessors. Variant that works before register allocation.
0272   extern char &EarlyTailDuplicateLegacyID;
0273 
0274   /// MachineTraceMetrics - This pass computes critical path and CPU resource
0275   /// usage in an ensemble of traces.
0276   extern char &MachineTraceMetricsID;
0277 
0278   /// EarlyIfConverter - This pass performs if-conversion on SSA form by
0279   /// inserting cmov instructions.
0280   extern char &EarlyIfConverterLegacyID;
0281 
0282   /// EarlyIfPredicator - This pass performs if-conversion on SSA form by
0283   /// predicating if/else block and insert select at the join point.
0284   extern char &EarlyIfPredicatorID;
0285 
0286   /// This pass performs instruction combining using trace metrics to estimate
0287   /// critical-path and resource depth.
0288   extern char &MachineCombinerID;
0289 
0290   /// StackSlotColoring - This pass performs stack coloring and merging.
0291   /// It merges disjoint allocas to reduce the stack size.
0292   extern char &StackColoringLegacyID;
0293 
0294   /// StackFramePrinter - This pass prints the stack frame layout and variable
0295   /// mappings.
0296   extern char &StackFrameLayoutAnalysisPassID;
0297 
0298   /// IfConverter - This pass performs machine code if conversion.
0299   extern char &IfConverterID;
0300 
0301   FunctionPass *createIfConverter(
0302       std::function<bool(const MachineFunction &)> Ftor);
0303 
0304   /// MachineBlockPlacement - This pass places basic blocks based on branch
0305   /// probabilities.
0306   extern char &MachineBlockPlacementID;
0307 
0308   /// MachineBlockPlacementStats - This pass collects statistics about the
0309   /// basic block placement using branch probabilities and block frequency
0310   /// information.
0311   extern char &MachineBlockPlacementStatsID;
0312 
0313   /// GCLowering Pass - Used by gc.root to perform its default lowering
0314   /// operations.
0315   FunctionPass *createGCLoweringPass();
0316 
0317   /// GCLowering Pass - Used by gc.root to perform its default lowering
0318   /// operations.
0319   extern char &GCLoweringID;
0320 
0321   /// ShadowStackGCLowering - Implements the custom lowering mechanism
0322   /// used by the shadow stack GC.  Only runs on functions which opt in to
0323   /// the shadow stack collector.
0324   FunctionPass *createShadowStackGCLoweringPass();
0325 
0326   /// ShadowStackGCLowering - Implements the custom lowering mechanism
0327   /// used by the shadow stack GC.
0328   extern char &ShadowStackGCLoweringID;
0329 
0330   /// GCMachineCodeAnalysis - Target-independent pass to mark safe points
0331   /// in machine code. Must be added very late during code generation, just
0332   /// prior to output, and importantly after all CFG transformations (such as
0333   /// branch folding).
0334   extern char &GCMachineCodeAnalysisID;
0335 
0336   /// MachineCSE - This pass performs global CSE on machine instructions.
0337   extern char &MachineCSELegacyID;
0338 
0339   /// MIRCanonicalizer - This pass canonicalizes MIR by renaming vregs
0340   /// according to the semantics of the instruction as well as hoists
0341   /// code.
0342   extern char &MIRCanonicalizerID;
0343 
0344   /// ImplicitNullChecks - This pass folds null pointer checks into nearby
0345   /// memory operations.
0346   extern char &ImplicitNullChecksID;
0347 
0348   /// This pass performs loop invariant code motion on machine instructions.
0349   extern char &MachineLICMID;
0350 
0351   /// This pass performs loop invariant code motion on machine instructions.
0352   /// This variant works before register allocation. \see MachineLICMID.
0353   extern char &EarlyMachineLICMID;
0354 
0355   /// MachineSinking - This pass performs sinking on machine instructions.
0356   extern char &MachineSinkingID;
0357 
0358   /// MachineCopyPropagation - This pass performs copy propagation on
0359   /// machine instructions.
0360   extern char &MachineCopyPropagationID;
0361 
0362   MachineFunctionPass *createMachineCopyPropagationPass(bool UseCopyInstr);
0363 
0364   /// MachineLateInstrsCleanup - This pass removes redundant identical
0365   /// instructions after register allocation and rematerialization.
0366   extern char &MachineLateInstrsCleanupID;
0367 
0368   /// PeepholeOptimizer - This pass performs peephole optimizations -
0369   /// like extension and comparison eliminations.
0370   extern char &PeepholeOptimizerLegacyID;
0371 
0372   /// OptimizePHIs - This pass optimizes machine instruction PHIs
0373   /// to take advantage of opportunities created during DAG legalization.
0374   extern char &OptimizePHIsLegacyID;
0375 
0376   /// StackSlotColoring - This pass performs stack slot coloring.
0377   extern char &StackSlotColoringID;
0378 
0379   /// This pass lays out funclets contiguously.
0380   extern char &FuncletLayoutID;
0381 
0382   /// This pass inserts the XRay instrumentation sleds if they are supported by
0383   /// the target platform.
0384   extern char &XRayInstrumentationID;
0385 
0386   /// This pass inserts FEntry calls
0387   extern char &FEntryInserterID;
0388 
0389   /// This pass implements the "patchable-function" attribute.
0390   extern char &PatchableFunctionID;
0391 
0392   /// createStackProtectorPass - This pass adds stack protectors to functions.
0393   ///
0394   FunctionPass *createStackProtectorPass();
0395 
0396   /// createMachineVerifierPass - This pass verifies cenerated machine code
0397   /// instructions for correctness.
0398   ///
0399   FunctionPass *createMachineVerifierPass(const std::string& Banner);
0400 
0401   /// createDwarfEHPass - This pass mulches exception handling code into a form
0402   /// adapted to code generation.  Required if using dwarf exception handling.
0403   FunctionPass *createDwarfEHPass(CodeGenOptLevel OptLevel);
0404 
0405   /// createWinEHPass - Prepares personality functions used by MSVC on Windows,
0406   /// in addition to the Itanium LSDA based personalities.
0407   FunctionPass *createWinEHPass(bool DemoteCatchSwitchPHIOnly = false);
0408 
0409   /// createSjLjEHPreparePass - This pass adapts exception handling code to use
0410   /// the GCC-style builtin setjmp/longjmp (sjlj) to handling EH control flow.
0411   ///
0412   FunctionPass *createSjLjEHPreparePass(const TargetMachine *TM);
0413 
0414   /// createWasmEHPass - This pass adapts exception handling code to use
0415   /// WebAssembly's exception handling scheme.
0416   FunctionPass *createWasmEHPass();
0417 
0418   /// LocalStackSlotAllocation - This pass assigns local frame indices to stack
0419   /// slots relative to one another and allocates base registers to access them
0420   /// when it is estimated by the target to be out of range of normal frame
0421   /// pointer or stack pointer index addressing.
0422   extern char &LocalStackSlotAllocationID;
0423 
0424   /// This pass expands pseudo-instructions, reserves registers and adjusts
0425   /// machine frame information.
0426   extern char &FinalizeISelID;
0427 
0428   /// UnpackMachineBundles - This pass unpack machine instruction bundles.
0429   extern char &UnpackMachineBundlesID;
0430 
0431   FunctionPass *
0432   createUnpackMachineBundles(std::function<bool(const MachineFunction &)> Ftor);
0433 
0434   /// FinalizeMachineBundles - This pass finalize machine instruction
0435   /// bundles (created earlier, e.g. during pre-RA scheduling).
0436   extern char &FinalizeMachineBundlesID;
0437 
0438   /// StackMapLiveness - This pass analyses the register live-out set of
0439   /// stackmap/patchpoint intrinsics and attaches the calculated information to
0440   /// the intrinsic for later emission to the StackMap.
0441   extern char &StackMapLivenessID;
0442 
0443   // MachineSanitizerBinaryMetadata - appends/finalizes sanitizer binary
0444   // metadata after llvm SanitizerBinaryMetadata pass.
0445   extern char &MachineSanitizerBinaryMetadataID;
0446 
0447   /// RemoveLoadsIntoFakeUses pass.
0448   extern char &RemoveLoadsIntoFakeUsesID;
0449 
0450   /// RemoveRedundantDebugValues pass.
0451   extern char &RemoveRedundantDebugValuesID;
0452 
0453   /// MachineCFGPrinter pass.
0454   extern char &MachineCFGPrinterID;
0455 
0456   /// LiveDebugValues pass
0457   extern char &LiveDebugValuesID;
0458 
0459   /// InterleavedAccess Pass - This pass identifies and matches interleaved
0460   /// memory accesses to target specific intrinsics.
0461   ///
0462   FunctionPass *createInterleavedAccessPass();
0463 
0464   /// InterleavedLoadCombines Pass - This pass identifies interleaved loads and
0465   /// combines them into wide loads detectable by InterleavedAccessPass
0466   ///
0467   FunctionPass *createInterleavedLoadCombinePass();
0468 
0469   /// LowerEmuTLS - This pass generates __emutls_[vt].xyz variables for all
0470   /// TLS variables for the emulated TLS model.
0471   ///
0472   ModulePass *createLowerEmuTLSPass();
0473 
0474   /// This pass lowers the \@llvm.load.relative and \@llvm.objc.* intrinsics to
0475   /// instructions.  This is unsafe to do earlier because a pass may combine the
0476   /// constant initializer into the load, which may result in an overflowing
0477   /// evaluation.
0478   ModulePass *createPreISelIntrinsicLoweringPass();
0479 
0480   /// GlobalMerge - This pass merges internal (by default) globals into structs
0481   /// to enable reuse of a base pointer by indexed addressing modes.
0482   /// It can also be configured to focus on size optimizations only.
0483   ///
0484   Pass *createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset,
0485                               bool OnlyOptimizeForSize = false,
0486                               bool MergeExternalByDefault = false,
0487                               bool MergeConstantByDefault = false,
0488                               bool MergeConstAggressiveByDefault = false);
0489 
0490   /// This pass splits the stack into a safe stack and an unsafe stack to
0491   /// protect against stack-based overflow vulnerabilities.
0492   FunctionPass *createSafeStackPass();
0493 
0494   /// This pass detects subregister lanes in a virtual register that are used
0495   /// independently of other lanes and splits them into separate virtual
0496   /// registers.
0497   extern char &RenameIndependentSubregsID;
0498 
0499   /// This pass is executed POST-RA to collect which physical registers are
0500   /// preserved by given machine function.
0501   FunctionPass *createRegUsageInfoCollector();
0502 
0503   /// Return a MachineFunction pass that identifies call sites
0504   /// and propagates register usage information of callee to caller
0505   /// if available with PysicalRegisterUsageInfo pass.
0506   FunctionPass *createRegUsageInfoPropPass();
0507 
0508   /// This pass performs software pipelining on machine instructions.
0509   extern char &MachinePipelinerID;
0510 
0511   /// This pass frees the memory occupied by the MachineFunction.
0512   FunctionPass *createFreeMachineFunctionPass();
0513 
0514   /// This pass performs merging similar functions globally.
0515   ModulePass *createGlobalMergeFuncPass();
0516 
0517   /// This pass performs outlining on machine instructions directly before
0518   /// printing assembly.
0519   ModulePass *createMachineOutlinerPass(bool RunOnAllFunctions = true);
0520 
0521   /// This pass expands the reduction intrinsics into sequences of shuffles.
0522   FunctionPass *createExpandReductionsPass();
0523 
0524   // This pass replaces intrinsics operating on vector operands with calls to
0525   // the corresponding function in a vector library (e.g., SVML, libmvec).
0526   FunctionPass *createReplaceWithVeclibLegacyPass();
0527 
0528   // Expands large div/rem instructions.
0529   FunctionPass *createExpandLargeDivRemPass();
0530 
0531   // Expands large div/rem instructions.
0532   FunctionPass *createExpandLargeFpConvertPass();
0533 
0534   // This pass expands memcmp() to load/stores.
0535   FunctionPass *createExpandMemCmpLegacyPass();
0536 
0537   /// Creates Break False Dependencies pass. \see BreakFalseDeps.cpp
0538   FunctionPass *createBreakFalseDeps();
0539 
0540   // This pass expands indirectbr instructions.
0541   FunctionPass *createIndirectBrExpandPass();
0542 
0543   /// Creates CFI Fixup pass. \see CFIFixup.cpp
0544   FunctionPass *createCFIFixup();
0545 
0546   /// Creates CFI Instruction Inserter pass. \see CFIInstrInserter.cpp
0547   FunctionPass *createCFIInstrInserter();
0548 
0549   /// Creates CFGuard longjmp target identification pass.
0550   /// \see CFGuardLongjmp.cpp
0551   FunctionPass *createCFGuardLongjmpPass();
0552 
0553   /// Creates EHContGuard catchret target identification pass.
0554   /// \see EHContGuardCatchret.cpp
0555   FunctionPass *createEHContGuardCatchretPass();
0556 
0557   /// Create Hardware Loop pass. \see HardwareLoops.cpp
0558   FunctionPass *createHardwareLoopsLegacyPass();
0559 
0560   /// This pass inserts pseudo probe annotation for callsite profiling.
0561   FunctionPass *createPseudoProbeInserter();
0562 
0563   /// Create IR Type Promotion pass. \see TypePromotion.cpp
0564   FunctionPass *createTypePromotionLegacyPass();
0565 
0566   /// Add Flow Sensitive Discriminators. PassNum specifies the
0567   /// sequence number of this pass (starting from 1).
0568   FunctionPass *
0569   createMIRAddFSDiscriminatorsPass(sampleprof::FSDiscriminatorPass P);
0570 
0571   /// Read Flow Sensitive Profile.
0572   FunctionPass *
0573   createMIRProfileLoaderPass(std::string File, std::string RemappingFile,
0574                              sampleprof::FSDiscriminatorPass P,
0575                              IntrusiveRefCntPtr<vfs::FileSystem> FS);
0576 
0577   /// Creates MIR Debugify pass. \see MachineDebugify.cpp
0578   ModulePass *createDebugifyMachineModulePass();
0579 
0580   /// Creates MIR Strip Debug pass. \see MachineStripDebug.cpp
0581   /// If OnlyDebugified is true then it will only strip debug info if it was
0582   /// added by a Debugify pass. The module will be left unchanged if the debug
0583   /// info was generated by another source such as clang.
0584   ModulePass *createStripDebugMachineModulePass(bool OnlyDebugified);
0585 
0586   /// Creates MIR Check Debug pass. \see MachineCheckDebugify.cpp
0587   ModulePass *createCheckDebugMachineModulePass();
0588 
0589   /// The pass fixups statepoint machine instruction to replace usage of
0590   /// caller saved registers with stack slots.
0591   extern char &FixupStatepointCallerSavedID;
0592 
0593   /// The pass transforms load/store <256 x i32> to AMX load/store intrinsics
0594   /// or split the data to two <128 x i32>.
0595   FunctionPass *createX86LowerAMXTypePass();
0596 
0597   /// The pass transforms amx intrinsics to scalar operation if the function has
0598   /// optnone attribute or it is O0.
0599   FunctionPass *createX86LowerAMXIntrinsicsPass();
0600 
0601   /// When learning an eviction policy, extract score(reward) information,
0602   /// otherwise this does nothing
0603   FunctionPass *createRegAllocScoringPass();
0604 
0605   /// JMC instrument pass.
0606   ModulePass *createJMCInstrumenterPass();
0607 
0608   /// This pass converts conditional moves to conditional jumps when profitable.
0609   FunctionPass *createSelectOptimizePass();
0610 
0611   FunctionPass *createCallBrPass();
0612 
0613   /// Lowers KCFI operand bundles for indirect calls.
0614   FunctionPass *createKCFIPass();
0615 } // End llvm namespace
0616 
0617 #endif