LLVM 24.0.0git
Passes.h
Go to the documentation of this file.
1//===-- Passes.h - Target independent code generation 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 defines interfaces to access the target independent code generation
10// passes provided by the LLVM backend.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CODEGEN_PASSES_H
15#define LLVM_CODEGEN_PASSES_H
16
22
23#include <functional>
24#include <string>
25
26namespace llvm {
27
28class FunctionPass;
29class MachineFunction;
31class ModulePass;
32class Pass;
33class TargetMachine;
34class raw_ostream;
35enum class RunOutliner;
36
37template <typename T> class IntrusiveRefCntPtr;
38
39} // namespace llvm
40
41// List of target independent CodeGen pass IDs.
42namespace llvm {
43
44/// AtomicExpandPass - At IR level this pass replace atomic instructions with
45/// __atomic_* library calls, or target specific instruction which implement the
46/// same semantics in a way which better fits the target backend.
48
49/// createUnreachableBlockEliminationPass - The LLVM code generator does not
50/// work well with unreachable basic blocks (what live ranges make sense for a
51/// block that cannot be reached?). As such, a code generator should either
52/// not instruction select unreachable blocks, or run this pass as its
53/// last LLVM modifying pass to clean up blocks that are not reachable from
54/// the entry block.
56
57/// createGCEmptyBasicblocksPass - Empty basic blocks (basic blocks without
58/// real code) appear as the result of optimization passes removing
59/// instructions. These blocks confuscate profile analysis (e.g., basic block
60/// sections) since they will share the address of their fallthrough blocks.
61/// This pass garbage-collects such basic blocks.
63
64/// createBasicBlockSections Pass - This pass assigns sections to machine
65/// basic blocks and is enabled with -fbasic-block-sections.
67
69
70/// createBasicBlockMatchingAndInferencePass - This pass enables matching
71/// and inference when using propeller.
73
74/// createInsertCodePrefetchPass - This pass enables inserting code prefetch
75/// hints based on the basic block section profile.
77
78/// createMachineBlockHashInfoPass - This pass computes basic block hashes.
80
81/// createMachineFunctionSplitterPass - This pass splits machine functions
82/// using profile information.
84
85/// createStaticDataSplitterPass - This is a machine-function pass that
86/// categorizes static data hotness using profile information.
88
89/// createStaticDataAnnotatorPASS - This is a module pass that reads from
90/// StaticDataProfileInfoWrapperPass and annotates the section prefix of
91/// global variables.
93
94/// MachineFunctionPrinter pass - This pass prints out the machine function to
95/// the given stream as a debugging tool.
98 const std::string &Banner = "");
99
100/// MIR2VecVocabPrinter pass - This pass prints out the MIR2Vec vocabulary
101/// contents to the given stream as a debugging tool.
104
105/// MIR2VecPrinter pass - This pass prints out the MIR2Vec embeddings for
106/// machine functions, basic blocks and instructions.
108
109/// StackFramePrinter pass - This pass prints out the machine function's
110/// stack frame to the given stream as a debugging tool.
112
113/// MIRPrinting pass - this pass prints out the LLVM IR into the given stream
114/// using the MIR serialization format.
116
117/// This pass resets a MachineFunction when it has the FailedISel property
118/// as if it was just created.
119/// If EmitFallbackDiag is true, the pass will emit a
120/// DiagnosticInfoISelFallback for every MachineFunction it resets.
121/// If AbortOnFailedISel is true, abort compilation instead of resetting.
124 bool AbortOnFailedISel);
125
126/// createCodeGenPrepareLegacyPass - Transform the code to expose more pattern
127/// matching during instruction selection.
129
130/// This pass implements generation of target-specific intrinsics to support
131/// handling of complex number arithmetic
133
134/// AtomicExpandID -- Lowers atomic operations in terms of either cmpxchg
135/// load-linked/store-conditional loops.
136LLVM_ABI extern char &AtomicExpandID;
137
138/// MachineLoopInfo - This pass is a loop analysis pass.
139LLVM_ABI extern char &MachineLoopInfoID;
140
141/// MachineDominators - This pass is a machine dominators analysis pass.
142LLVM_ABI extern char &MachineDominatorsID;
143
144/// MachineDominanaceFrontier - This pass is a machine dominators analysis.
146
147/// MachineRegionInfo - This pass computes SESE regions for machine functions.
149
150/// EdgeBundles analysis - Bundle machine CFG edges.
152
153/// LiveVariables pass - This pass computes the set of blocks in which each
154/// variable is life and sets machine operand kill flags.
155LLVM_ABI extern char &LiveVariablesID;
156
157/// PHIElimination - This pass eliminates machine instruction PHI nodes
158/// by inserting copy instructions. This destroys SSA information, but is the
159/// desired input for some register allocators. This pass is "required" by
160/// these register allocator like this: AU.addRequiredID(PHIEliminationID);
161LLVM_ABI extern char &PHIEliminationID;
162
163/// LiveIntervals - This analysis keeps track of the live ranges of virtual
164/// and physical registers.
165LLVM_ABI extern char &LiveIntervalsID;
166
167/// LiveStacks pass. An analysis keeping track of the liveness of stack slots.
168LLVM_ABI extern char &LiveStacksID;
169
170/// TwoAddressInstruction - This pass reduces two-address instructions to
171/// use two operands. This destroys SSA information but it is desired by
172/// register allocators.
174
175/// ProcessImpicitDefs pass - This pass removes IMPLICIT_DEFs.
177
178/// RegisterCoalescer - This pass merges live ranges to eliminate copies.
179LLVM_ABI extern char &RegisterCoalescerID;
180
181/// MachineScheduler - This pass schedules machine instructions.
182LLVM_ABI extern char &MachineSchedulerID;
183
184/// PostMachineScheduler - This pass schedules machine instructions postRA.
186
187/// SpillPlacement analysis. Suggest optimal placement of spill code between
188/// basic blocks.
189LLVM_ABI extern char &SpillPlacementID;
190
191/// ShrinkWrap pass. Look for the best place to insert save and restore
192// instruction and update the MachineFunctionInfo with that information.
193LLVM_ABI extern char &ShrinkWrapID;
194
195/// LiveRangeShrink pass. Move instruction close to its definition to shrink
196/// the definition's live range.
197LLVM_ABI extern char &LiveRangeShrinkID;
198
199/// Greedy register allocator.
200LLVM_ABI extern char &RAGreedyLegacyID;
201
202/// Basic register allocator.
203LLVM_ABI extern char &RABasicID;
204
205/// VirtRegRewriter pass. Rewrite virtual registers to physical registers as
206/// assigned in VirtRegMap.
207LLVM_ABI extern char &VirtRegRewriterID;
208LLVM_ABI FunctionPass *createVirtRegRewriter(bool ClearVirtRegs = true);
209
210/// UnreachableMachineBlockElimination - This pass removes unreachable
211/// machine basic blocks.
213
214/// DeadMachineInstructionElim - This pass removes dead machine instructions.
216
217/// This pass adds dead/undef flags after analyzing subregister lanes.
218LLVM_ABI extern char &DetectDeadLanesID;
219
220/// This pass perform post-ra machine sink for COPY instructions.
222
223/// This pass adds flow sensitive discriminators.
225
226/// This pass reads flow sensitive profile.
228
229// This pass gives undef values a Pseudo Instruction definition for
230// Instructions to ensure early-clobber is followed when using the greedy
231// register allocator.
232LLVM_ABI extern char &InitUndefID;
233
234/// FastRegisterAllocation Pass - This pass register allocates as fast as
235/// possible. It is best suited for debug code where live ranges are short.
236///
239 bool ClearVirtRegs);
240
241/// BasicRegisterAllocation Pass - This pass implements a degenerate global
242/// register allocator using the basic regalloc framework.
243///
246
247/// Greedy register allocation pass - This pass implements a global register
248/// allocator for optimized builds.
249///
252
253/// PBQPRegisterAllocation Pass - This pass implements the Partitioned Boolean
254/// Quadratic Prograaming (PBQP) based register allocator.
255///
257
258/// PrologEpilogCodeInserter - This pass inserts prolog and epilog code,
259/// and eliminates abstract frame references.
262
263/// ExpandPostRAPseudos - This pass expands pseudo instructions after
264/// register allocation.
266
267/// PostRAHazardRecognizer - This pass runs the post-ra hazard
268/// recognizer.
270
271/// PostRAScheduler - This pass performs post register allocation
272/// scheduling.
273LLVM_ABI extern char &PostRASchedulerID;
274
275/// BranchFolding - This pass performs machine code CFG based
276/// optimizations to delete branches to branches, eliminate branches to
277/// successor blocks (creating fall throughs), and eliminating branches over
278/// branches.
279LLVM_ABI extern char &BranchFolderPassID;
280
281/// BranchRelaxation - This pass replaces branches that need to jump further
282/// than is supported by a branch instruction.
284
285/// MachineFunctionPrinterPass - This pass prints out MachineInstr's.
287
288/// TailDuplicate - Duplicate blocks with unconditional branches
289/// into tails of their predecessors.
291
292/// Duplicate blocks with unconditional branches into tails of their
293/// predecessors. Variant that works before register allocation.
295
296/// MachineTraceMetrics - This pass computes critical path and CPU resource
297/// usage in an ensemble of traces.
299
300/// EarlyIfConverter - This pass performs if-conversion on SSA form by
301/// inserting cmov instructions.
303
304/// EarlyIfPredicator - This pass performs if-conversion on SSA form by
305/// predicating if/else block and insert select at the join point.
306LLVM_ABI extern char &EarlyIfPredicatorID;
307
308/// This pass performs instruction combining using trace metrics to estimate
309/// critical-path and resource depth.
310LLVM_ABI extern char &MachineCombinerID;
311
312/// StackSlotColoring - This pass performs stack coloring and merging.
313/// It merges disjoint allocas to reduce the stack size.
315
316/// StackFramePrinter - This pass prints the stack frame layout and variable
317/// mappings.
319
320/// IfConverter - This pass performs machine code if conversion.
321LLVM_ABI extern char &IfConverterID;
322
324createIfConverter(std::function<bool(const MachineFunction &)> Ftor);
325
326/// MachineBlockPlacement - This pass places basic blocks based on branch
327/// probabilities.
329
330/// MachineBlockPlacementStats - This pass collects statistics about the
331/// basic block placement using branch probabilities and block frequency
332/// information.
334
335/// GCLowering Pass - Used by gc.root to perform its default lowering
336/// operations.
338
339/// GCLowering Pass - Used by gc.root to perform its default lowering
340/// operations.
341LLVM_ABI extern char &GCLoweringID;
342
343/// ShadowStackGCLowering - Implements the custom lowering mechanism
344/// used by the shadow stack GC.
346
347/// GCMachineCodeAnalysis - Target-independent pass to mark safe points
348/// in machine code. Must be added very late during code generation, just
349/// prior to output, and importantly after all CFG transformations (such as
350/// branch folding).
352
353/// MachineCSE - This pass performs global CSE on machine instructions.
354LLVM_ABI extern char &MachineCSELegacyID;
355
356/// MIRCanonicalizer - This pass canonicalizes MIR by renaming vregs
357/// according to the semantics of the instruction as well as hoists
358/// code.
359LLVM_ABI extern char &MIRCanonicalizerID;
360
361/// ImplicitNullChecks - This pass folds null pointer checks into nearby
362/// memory operations.
363LLVM_ABI extern char &ImplicitNullChecksID;
364
365/// This pass performs loop invariant code motion on machine instructions.
366LLVM_ABI extern char &MachineLICMID;
367
368/// This pass performs loop invariant code motion on machine instructions.
369/// This variant works before register allocation. \see MachineLICMID.
370LLVM_ABI extern char &EarlyMachineLICMID;
371
372/// MachineSinking - This pass performs sinking on machine instructions.
374
375/// MachineCopyPropagation - This pass performs copy propagation on
376/// machine instructions.
378
380createMachineCopyPropagationPass(bool UseCopyInstr);
381
382/// MachineLateInstrsCleanup - This pass removes redundant identical
383/// instructions after register allocation and rematerialization.
385
386/// PeepholeOptimizer - This pass performs peephole optimizations -
387/// like extension and comparison eliminations.
389
390/// OptimizePHIs - This pass optimizes machine instruction PHIs
391/// to take advantage of opportunities created during DAG legalization.
392LLVM_ABI extern char &OptimizePHIsLegacyID;
393
394/// StackSlotColoring - This pass performs stack slot coloring.
395LLVM_ABI extern char &StackSlotColoringID;
396
397/// This pass lays out funclets contiguously.
398LLVM_ABI extern char &FuncletLayoutID;
399
400/// This pass inserts the XRay instrumentation sleds if they are supported by
401/// the target platform.
403
404/// This pass inserts FEntry calls
405LLVM_ABI extern char &FEntryInserterID;
406
407/// This pass implements the "patchable-function" attribute.
408LLVM_ABI extern char &PatchableFunctionID;
409
410/// createStackProtectorPass - This pass adds stack protectors to functions.
411///
413
414/// createMachineVerifierPass - This pass verifies cenerated machine code
415/// instructions for correctness.
416///
418
419/// createDwarfEHPass - This pass mulches exception handling code into a form
420/// adapted to code generation. Required if using dwarf exception handling.
422
423/// createWinEHPass - Prepares personality functions used by MSVC on Windows,
424/// in addition to the Itanium LSDA based personalities.
425LLVM_ABI FunctionPass *createWinEHPass(bool DemoteCatchSwitchPHIOnly = false);
426
427/// createSjLjEHPreparePass - This pass adapts exception handling code to use
428/// the GCC-style builtin setjmp/longjmp (sjlj) to handling EH control flow.
429///
431
432/// createWasmEHPass - This pass adapts exception handling code to use
433/// WebAssembly's exception handling scheme.
435
436/// LocalStackSlotAllocation - This pass assigns local frame indices to stack
437/// slots relative to one another and allocates base registers to access them
438/// when it is estimated by the target to be out of range of normal frame
439/// pointer or stack pointer index addressing.
441
442/// This pass expands pseudo-instructions, reserves registers and adjusts
443/// machine frame information.
444LLVM_ABI extern char &FinalizeISelID;
445
446/// UnpackMachineBundles - This pass unpack machine instruction bundles.
448
450 std::function<bool(const MachineFunction &)> Ftor);
451
452/// StackMapLiveness - This pass analyses the register live-out set of
453/// stackmap/patchpoint intrinsics and attaches the calculated information to
454/// the intrinsic for later emission to the StackMap.
455LLVM_ABI extern char &StackMapLivenessID;
456
457// MachineSanitizerBinaryMetadata - appends/finalizes sanitizer binary
458// metadata after llvm SanitizerBinaryMetadata pass.
460
461/// RemoveLoadsIntoFakeUses pass.
463
464/// RemoveRedundantDebugValues pass.
466
467/// MachineCFGPrinter pass.
468LLVM_ABI extern char &MachineCFGPrinterID;
469
470/// LiveDebugValues pass
471LLVM_ABI extern char &LiveDebugValuesID;
472
473/// InterleavedAccess Pass - This pass identifies and matches interleaved
474/// memory accesses to target specific intrinsics.
475///
477
478/// InterleavedLoadCombines Pass - This pass identifies interleaved loads and
479/// combines them into wide loads detectable by InterleavedAccessPass
480///
482
483/// LowerEmuTLS - This pass generates __emutls_[vt].xyz variables for all
484/// TLS variables for the emulated TLS model.
485///
487
488/// This pass lowers the \@llvm.load.relative and \@llvm.objc.* intrinsics to
489/// instructions. This is unsafe to do earlier because a pass may combine the
490/// constant initializer into the load, which may result in an overflowing
491/// evaluation.
493
494/// GlobalMerge - This pass merges internal (by default) globals into structs
495/// to enable reuse of a base pointer by indexed addressing modes.
496/// It can also be configured to focus on size optimizations only.
497///
499createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset,
500 bool OnlyOptimizeForSize = false,
501 bool MergeExternalByDefault = false,
502 bool MergeConstantByDefault = false,
503 bool MergeConstAggressiveByDefault = false);
504
505/// This pass splits the stack into a safe stack and an unsafe stack to
506/// protect against stack-based overflow vulnerabilities.
508
509/// This pass detects subregister lanes in a virtual register that are used
510/// independently of other lanes and splits them into separate virtual
511/// registers.
513
514/// This pass is executed POST-RA to collect which physical registers are
515/// preserved by given machine function.
517
518/// Return a MachineFunction pass that identifies call sites
519/// and propagates register usage information of callee to caller
520/// if available with PysicalRegisterUsageInfo pass.
522
523/// This pass performs software pipelining on machine instructions.
524LLVM_ABI extern char &MachinePipelinerID;
525
526/// This pass frees the memory occupied by the MachineFunction.
528
529/// This pass performs merging similar functions globally.
531
532/// This pass performs outlining on machine instructions directly before
533/// printing assembly.
535
536/// This pass expands the reduction intrinsics into sequences of shuffles.
538
539// This pass replaces intrinsics operating on vector operands with calls to
540// the corresponding function in a vector library (e.g., SVML, libmvec).
542
543// Expands large div/rem and floating-point instructions.
545
546/// Creates Break False Dependencies pass. \see BreakFalseDeps.cpp
548
549// This pass expands indirectbr instructions.
551
552/// Creates CFI Fixup pass. \see CFIFixup.cpp
554
555/// Creates CFI Instruction Inserter pass. \see CFIInstrInserter.cpp
557
558/// Creates CFGuard longjmp target identification pass.
559/// \see CFGuardLongjmp.cpp
561
562/// Creates Windows EH Continuation Guard target identification pass.
563/// \see EHContGuardTargets.cpp
565
566/// Create Hardware Loop pass. \see HardwareLoops.cpp
568
569/// This pass inserts pseudo probe annotation for callsite profiling.
571
572/// Create IR Type Promotion pass. \see TypePromotion.cpp
574
575/// Add Flow Sensitive Discriminators. PassNum specifies the
576/// sequence number of this pass (starting from 1).
579
580/// Read Flow Sensitive Profile.
582createMIRProfileLoaderPass(std::string File, std::string RemappingFile,
585
586/// Creates MIR Debugify pass. \see MachineDebugify.cpp
588
589/// Creates MIR Strip Debug pass. \see MachineStripDebug.cpp
590/// If OnlyDebugified is true then it will only strip debug info if it was
591/// added by a Debugify pass. The module will be left unchanged if the debug
592/// info was generated by another source such as clang.
594createStripDebugMachineModuleLegacyPass(bool OnlyDebugified);
595
596/// Creates MIR Check Debug pass. \see MachineCheckDebugify.cpp
598
599/// The pass fixups statepoint machine instruction to replace usage of
600/// caller saved registers with stack slots.
602
603/// When learning an eviction policy, extract score(reward) information,
604/// otherwise this does nothing
606
607/// JMC instrument pass.
609
610/// This pass converts conditional moves to conditional jumps when profitable.
612
614
615/// Creates Windows Secure Hot Patch pass. \see WindowsSecureHotPatching.cpp
617
618/// Lowers KCFI operand bundles for indirect calls.
620} // namespace llvm
621
622#endif
#define LLVM_ABI
Definition Compiler.h:215
#define F(x, y, z)
Definition MD5.cpp:54
#define P(N)
Contains the forward declaration for vfs::FileSystem, as well as the IntrusiveRefCntPtrInfo specializ...
FunctionPass class - This class is used to implement most global optimizations.
Definition Pass.h:314
A smart pointer to a reference-counted object that inherits from RefCountedBase or ThreadSafeRefCount...
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
Definition Pass.h:255
Pass interface - Implemented by all 'passes'.
Definition Pass.h:99
Primary interface to the complete machine description for the target machine.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI FunctionPass * createIndirectBrExpandPass()
LLVM_ABI FunctionPass * createFastRegisterAllocator()
FastRegisterAllocation Pass - This pass register allocates as fast as possible.
LLVM_ABI char & EarlyMachineLICMID
This pass performs loop invariant code motion on machine instructions.
LLVM_ABI char & GCMachineCodeAnalysisID
GCMachineCodeAnalysis - Target-independent pass to mark safe points in machine code.
LLVM_ABI char & PostRAHazardRecognizerID
PostRAHazardRecognizer - This pass runs the post-ra hazard recognizer.
std::function< bool(const TargetRegisterInfo &TRI, const MachineRegisterInfo &MRI, const Register Reg)> RegAllocFilterFunc
Filter function for register classes during regalloc.
LLVM_ABI char & MachineDominanceFrontierID
MachineDominanaceFrontier - This pass is a machine dominators analysis.
LLVM_ABI char & FEntryInserterID
This pass inserts FEntry calls.
LLVM_ABI char & GCLoweringID
GCLowering Pass - Used by gc.root to perform its default lowering operations.
LLVM_ABI ModulePass * createJMCInstrumenterPass()
JMC instrument pass.
LLVM_ABI char & InitUndefID
LLVM_ABI FunctionPass * createIfConverter(std::function< bool(const MachineFunction &)> Ftor)
LLVM_ABI char & RegisterCoalescerID
RegisterCoalescer - This pass merges live ranges to eliminate copies.
LLVM_ABI char & MIRAddFSDiscriminatorsID
This pass adds flow sensitive discriminators.
LLVM_ABI FunctionPass * createTypePromotionLegacyPass()
Create IR Type Promotion pass.
LLVM_ABI FunctionPass * createGreedyRegisterAllocator()
Greedy register allocation pass - This pass implements a global register allocator for optimized buil...
LLVM_ABI MachineFunctionPass * createPrintMIRPass(raw_ostream &OS)
MIRPrinting pass - this pass prints out the LLVM IR into the given stream using the MIR serialization...
LLVM_ABI FunctionPass * createSafeStackPass()
This pass splits the stack into a safe stack and an unsafe stack to protect against stack-based overf...
LLVM_ABI ModulePass * createStaticDataAnnotatorLegacyPass()
createStaticDataAnnotatorPASS - This is a module pass that reads from StaticDataProfileInfoWrapperPas...
LLVM_ABI char & MachineCFGPrinterID
MachineCFGPrinter pass.
LLVM_ABI FunctionPass * createEHContGuardTargetsLegacy()
Creates Windows EH Continuation Guard target identification pass.
LLVM_ABI FunctionPass * createSelectOptimizePass()
This pass converts conditional moves to conditional jumps when profitable.
LLVM_ABI FunctionPass * createWasmEHPass()
createWasmEHPass - This pass adapts exception handling code to use WebAssembly's exception handling s...
LLVM_ABI char & FixupStatepointCallerSavedID
The pass fixups statepoint machine instruction to replace usage of caller saved registers with stack ...
LLVM_ABI Pass * createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset, bool OnlyOptimizeForSize=false, bool MergeExternalByDefault=false, bool MergeConstantByDefault=false, bool MergeConstAggressiveByDefault=false)
GlobalMerge - This pass merges internal (by default) globals into structs to enable reuse of a base p...
LLVM_ABI MachineFunctionPass * createBasicBlockSectionsPass()
createBasicBlockSections Pass - This pass assigns sections to machine basic blocks and is enabled wit...
LLVM_ABI FunctionPass * createPseudoProbeInserter()
This pass inserts pseudo probe annotation for callsite profiling.
LLVM_ABI char & MachineDominatorsID
MachineDominators - This pass is a machine dominators analysis pass.
LLVM_ABI MachineFunctionPass * createPrologEpilogInserterPass()
LLVM_ABI char & TailDuplicateLegacyID
TailDuplicate - Duplicate blocks with unconditional branches into tails of their predecessors.
LLVM_ABI char & LiveStacksID
LiveStacks pass. An analysis keeping track of the liveness of stack slots.
LLVM_ABI char & ExpandPostRAPseudosID
ExpandPostRAPseudos - This pass expands pseudo instructions after register allocation.
LLVM_ABI ModulePass * createStripDebugMachineModuleLegacyPass(bool OnlyDebugified)
Creates MIR Strip Debug pass.
LLVM_ABI char & PatchableFunctionID
This pass implements the "patchable-function" attribute.
LLVM_ABI MachineFunctionPass * createResetMachineFunctionLegacyPass(bool EmitFallbackDiag, bool AbortOnFailedISel)
This pass resets a MachineFunction when it has the FailedISel property as if it was just created.
LLVM_ABI char & PostRASchedulerID
PostRAScheduler - This pass performs post register allocation scheduling.
LLVM_ABI char & RemoveLoadsIntoFakeUsesID
RemoveLoadsIntoFakeUses pass.
LLVM_ABI char & MIRProfileLoaderPassID
This pass reads flow sensitive profile.
LLVM_ABI MachineFunctionPass * createStackFrameLayoutAnalysisPass()
StackFramePrinter pass - This pass prints out the machine function's stack frame to the given stream ...
LLVM_ABI ModulePass * createGlobalMergeFuncPass()
This pass performs merging similar functions globally.
LLVM_ABI char & MachineSanitizerBinaryMetadataID
LLVM_ABI FunctionPass * createStackProtectorPass()
createStackProtectorPass - This pass adds stack protectors to functions.
LLVM_ABI char & MIRCanonicalizerID
MIRCanonicalizer - This pass canonicalizes MIR by renaming vregs according to the semantics of the in...
LLVM_ABI char & MachineSchedulerID
MachineScheduler - This pass schedules machine instructions.
LLVM_ABI char & PostMachineSchedulerID
PostMachineScheduler - This pass schedules machine instructions postRA.
LLVM_ABI char & PeepholeOptimizerLegacyID
PeepholeOptimizer - This pass performs peephole optimizations - like extension and comparison elimina...
LLVM_ABI char & LiveDebugValuesID
LiveDebugValues pass.
LLVM_ABI char & PrologEpilogCodeInserterID
PrologEpilogCodeInserter - This pass inserts prolog and epilog code, and eliminates abstract frame re...
LLVM_ABI FunctionPass * createExpandIRInstsPass(CodeGenOptLevel)
LLVM_ABI char & EarlyIfConverterLegacyID
EarlyIfConverter - This pass performs if-conversion on SSA form by inserting cmov instructions.
LLVM_ABI FunctionPass * createCFIInstrInserterLegacy()
Creates CFI Instruction Inserter pass.
LLVM_ABI MachineFunctionPass * createMachineFunctionSplitterPass()
createMachineFunctionSplitterPass - This pass splits machine functions using profile information.
LLVM_ABI FunctionPass * createMachineVerifierPass(const std::string &Banner)
createMachineVerifierPass - This pass verifies cenerated machine code instructions for correctness.
LLVM_ABI char & SpillPlacementID
SpillPlacement analysis.
LLVM_ABI char & MachineLoopInfoID
MachineLoopInfo - This pass is a loop analysis pass.
LLVM_ABI char & ShadowStackGCLoweringID
ShadowStackGCLowering - Implements the custom lowering mechanism used by the shadow stack GC.
LLVM_ABI char & MachineCombinerID
This pass performs instruction combining using trace metrics to estimate critical-path and resource d...
LLVM_ABI FunctionPass * createUnpackMachineBundlesLegacy(std::function< bool(const MachineFunction &)> Ftor)
LLVM_ABI char & ImplicitNullChecksID
ImplicitNullChecks - This pass folds null pointer checks into nearby memory operations.
LLVM_ABI FunctionPass * createMIRAddFSDiscriminatorsPass(sampleprof::FSDiscriminatorPass P)
Add Flow Sensitive Discriminators.
LLVM_ABI ModulePass * createPreISelIntrinsicLoweringPass()
This pass lowers the @llvm.load.relative and @llvm.objc.
LLVM_ABI char & ShrinkWrapID
ShrinkWrap pass. Look for the best place to insert save and restore.
LLVM_ABI char & MachineLateInstrsCleanupID
MachineLateInstrsCleanup - This pass removes redundant identical instructions after register allocati...
LLVM_ABI char & BranchRelaxationPassID
BranchRelaxation - This pass replaces branches that need to jump further than is supported by a branc...
LLVM_ABI char & UnreachableMachineBlockElimID
UnreachableMachineBlockElimination - This pass removes unreachable machine basic blocks.
LLVM_ABI FunctionPass * createRegUsageInfoCollector()
This pass is executed POST-RA to collect which physical registers are preserved by given machine func...
LLVM_ABI MachineFunctionPass * createMIR2VecPrinterLegacyPass(raw_ostream &OS)
Create a machine pass that prints MIR2Vec embeddings.
Definition MIR2Vec.cpp:706
LLVM_ABI FunctionPass * createKCFIPass()
Lowers KCFI operand bundles for indirect calls.
Definition KCFI.cpp:75
LLVM_ABI FunctionPass * createComplexDeinterleavingPass(const TargetMachine *TM)
This pass implements generation of target-specific intrinsics to support handling of complex number a...
LLVM_ABI char & LiveRangeShrinkID
LiveRangeShrink pass.
LLVM_ABI char & XRayInstrumentationID
This pass inserts the XRay instrumentation sleds if they are supported by the target platform.
LLVM_ABI char & OptimizePHIsLegacyID
OptimizePHIs - This pass optimizes machine instruction PHIs to take advantage of opportunities create...
LLVM_ABI char & StackMapLivenessID
StackMapLiveness - This pass analyses the register live-out set of stackmap/patchpoint intrinsics and...
LLVM_ABI char & StackFrameLayoutAnalysisPassID
StackFramePrinter - This pass prints the stack frame layout and variable mappings.
LLVM_ABI char & FuncletLayoutID
This pass lays out funclets contiguously.
LLVM_ABI FunctionPass * createCodeGenPrepareLegacyPass()
createCodeGenPrepareLegacyPass - Transform the code to expose more pattern matching during instructio...
LLVM_ABI MachineFunctionPass * createMachineFunctionPrinterPass(raw_ostream &OS, const std::string &Banner="")
MachineFunctionPrinter pass - This pass prints out the machine function to the given stream as a debu...
LLVM_ABI char & RemoveRedundantDebugValuesID
RemoveRedundantDebugValues pass.
LLVM_ABI char & DetectDeadLanesID
This pass adds dead/undef flags after analyzing subregister lanes.
LLVM_ABI char & PostRAMachineSinkingID
This pass perform post-ra machine sink for COPY instructions.
LLVM_ABI FunctionPass * createDwarfEHPass(CodeGenOptLevel OptLevel)
createDwarfEHPass - This pass mulches exception handling code into a form adapted to code generation.
LLVM_ABI FunctionPass * createRegAllocScoringPass()
When learning an eviction policy, extract score(reward) information, otherwise this does nothing.
CodeGenOptLevel
Code generation optimization level.
Definition CodeGen.h:227
LLVM_ABI FunctionPass * createCFGuardLongjmpPass()
Creates CFGuard longjmp target identification pass.
LLVM_ABI char & StackSlotColoringID
StackSlotColoring - This pass performs stack slot coloring.
LLVM_ABI char & EarlyIfPredicatorID
EarlyIfPredicator - This pass performs if-conversion on SSA form by predicating if/else block and ins...
LLVM_ABI ModulePass * createMachineOutlinerPass(RunOutliner RunOutlinerMode)
This pass performs outlining on machine instructions directly before printing assembly.
LLVM_ABI FunctionPass * createDefaultPBQPRegisterAllocator()
PBQPRegisterAllocation Pass - This pass implements the Partitioned Boolean Quadratic Prograaming (PBQ...
LLVM_ABI FunctionPass * createInterleavedAccessPass()
InterleavedAccess Pass - This pass identifies and matches interleaved memory accesses to target speci...
LLVM_ABI ModulePass * createLowerEmuTLSPass()
LowerEmuTLS - This pass generates __emutls_[vt].xyz variables for all TLS variables for the emulated ...
LLVM_ABI FunctionPass * createBasicRegisterAllocator()
BasicRegisterAllocation Pass - This pass implements a degenerate global register allocator using the ...
LLVM_ABI char & MachineTraceMetricsID
MachineTraceMetrics - This pass computes critical path and CPU resource usage in an ensemble of trace...
LLVM_ABI char & ProcessImplicitDefsID
ProcessImpicitDefs pass - This pass removes IMPLICIT_DEFs.
LLVM_ABI MachineFunctionPass * createInsertCodePrefetchPass()
createInsertCodePrefetchPass - This pass enables inserting code prefetch hints based on the basic blo...
LLVM_ABI char & MachinePipelinerID
This pass performs software pipelining on machine instructions.
LLVM_ABI FunctionPass * createMIRProfileLoaderPass(std::string File, std::string RemappingFile, sampleprof::FSDiscriminatorPass P, IntrusiveRefCntPtr< vfs::FileSystem > FS)
Read Flow Sensitive Profile.
LLVM_ABI char & EdgeBundlesWrapperLegacyID
EdgeBundles analysis - Bundle machine CFG edges.
LLVM_ABI MachineFunctionPass * createMIR2VecVocabPrinterLegacyPass(raw_ostream &OS)
MIR2VecVocabPrinter pass - This pass prints out the MIR2Vec vocabulary contents to the given stream a...
Definition MIR2Vec.cpp:653
LLVM_ABI char & MachineCSELegacyID
MachineCSE - This pass performs global CSE on machine instructions.
LLVM_ABI FunctionPass * createWinEHPass(bool DemoteCatchSwitchPHIOnly=false)
createWinEHPass - Prepares personality functions used by MSVC on Windows, in addition to the Itanium ...
LLVM_ABI char & MachineRegionInfoPassID
MachineRegionInfo - This pass computes SESE regions for machine functions.
LLVM_ABI MachineFunctionPass * createMachineBlockHashInfoPass()
createMachineBlockHashInfoPass - This pass computes basic block hashes.
LLVM_ABI char & LiveVariablesID
LiveVariables pass - This pass computes the set of blocks in which each variable is life and sets mac...
LLVM_ABI char & EarlyTailDuplicateLegacyID
Duplicate blocks with unconditional branches into tails of their predecessors.
LLVM_ABI FunctionPass * createExpandReductionsPass()
This pass expands the reduction intrinsics into sequences of shuffles.
LLVM_ABI MachineFunctionPass * createStaticDataSplitterLegacyPass()
createStaticDataSplitterPass - This is a machine-function pass that categorizes static data hotness u...
LLVM_ABI FunctionPass * createSjLjEHPreparePass(const TargetMachine *TM)
createSjLjEHPreparePass - This pass adapts exception handling code to use the GCC-style builtin setjm...
LLVM_ABI MachineFunctionPass * createBasicBlockPathCloningPass()
LLVM_ABI char & StackColoringLegacyID
StackSlotColoring - This pass performs stack coloring and merging.
LLVM_ABI char & VirtRegRewriterID
VirtRegRewriter pass.
LLVM_ABI FunctionPass * createGCLoweringPass()
GCLowering Pass - Used by gc.root to perform its default lowering operations.
LLVM_ABI FunctionPass * createReplaceWithVeclibLegacyPass()
LLVM_ABI FunctionPass * createInlineAsmPreparePass()
LLVM_ABI FunctionPass * createVirtRegRewriter(bool ClearVirtRegs=true)
LLVM_ABI char & FinalizeISelID
This pass expands pseudo-instructions, reserves registers and adjusts machine frame information.
LLVM_ABI char & MachineSinkingLegacyID
MachineSinking - This pass performs sinking on machine instructions.
LLVM_ABI FunctionPass * createRegUsageInfoPropPass()
Return a MachineFunction pass that identifies call sites and propagates register usage information of...
LLVM_ABI char & IfConverterID
IfConverter - This pass performs machine code if conversion.
LLVM_ABI char & MachineBlockPlacementID
MachineBlockPlacement - This pass places basic blocks based on branch probabilities.
LLVM_ABI char & TwoAddressInstructionPassID
TwoAddressInstruction - This pass reduces two-address instructions to use two operands.
LLVM_ABI FunctionPass * createAtomicExpandLegacyPass()
AtomicExpandPass - At IR level this pass replace atomic instructions with __atomic_* library calls,...
LLVM_ABI MachineFunctionPass * createBasicBlockMatchingAndInferencePass()
createBasicBlockMatchingAndInferencePass - This pass enables matching and inference when using propel...
LLVM_ABI ModulePass * createCheckDebugMachineModuleLegacyPass()
Creates MIR Check Debug pass.
LLVM_ABI char & LocalStackSlotAllocationID
LocalStackSlotAllocation - This pass assigns local frame indices to stack slots relative to one anoth...
LLVM_ABI char & RAGreedyLegacyID
Greedy register allocator.
LLVM_ABI char & BranchFolderPassID
BranchFolding - This pass performs machine code CFG based optimizations to delete branches to branche...
LLVM_ABI MachineFunctionPass * createMachineCopyPropagationPass(bool UseCopyInstr)
LLVM_ABI char & PHIEliminationID
PHIElimination - This pass eliminates machine instruction PHI nodes by inserting copy instructions.
LLVM_ABI ModulePass * createDebugifyMachineModulePass()
Creates MIR Debugify pass.
LLVM_ABI char & MachineFunctionPrinterPassID
MachineFunctionPrinterPass - This pass prints out MachineInstr's.
LLVM_ABI FunctionPass * createFreeMachineFunctionPass()
This pass frees the memory occupied by the MachineFunction.
LLVM_ABI FunctionPass * createBreakFalseDepsLegacyPass()
Creates Break False Dependencies pass.
LLVM_ABI ModulePass * createWindowsSecureHotPatchingPass()
Creates Windows Secure Hot Patch pass.
LLVM_ABI FunctionPass * createCFIFixupLegacy()
Creates CFI Fixup pass.
LLVM_ABI char & RenameIndependentSubregsID
This pass detects subregister lanes in a virtual register that are used independently of other lanes ...
LLVM_ABI char & MachineLICMID
This pass performs loop invariant code motion on machine instructions.
LLVM_ABI char & MachineBlockPlacementStatsID
MachineBlockPlacementStats - This pass collects statistics about the basic block placement using bran...
LLVM_ABI MachineFunctionPass * createGCEmptyBasicBlocksLegacyPass()
createGCEmptyBasicblocksPass - Empty basic blocks (basic blocks without real code) appear as the resu...
LLVM_ABI FunctionPass * createInterleavedLoadCombinePass()
InterleavedLoadCombines Pass - This pass identifies interleaved loads and combines them into wide loa...
LLVM_ABI char & RABasicID
Basic register allocator.
LLVM_ABI char & LiveIntervalsID
LiveIntervals - This analysis keeps track of the live ranges of virtual and physical registers.
LLVM_ABI char & MachineCopyPropagationID
MachineCopyPropagation - This pass performs copy propagation on machine instructions.
LLVM_ABI char & AtomicExpandID
AtomicExpandID – Lowers atomic operations in terms of either cmpxchg load-linked/store-conditional lo...
LLVM_ABI char & DeadMachineInstructionElimID
DeadMachineInstructionElim - This pass removes dead machine instructions.
LLVM_ABI FunctionPass * createHardwareLoopsLegacyPass()
Create Hardware Loop pass.
LLVM_ABI char & UnpackMachineBundlesID
UnpackMachineBundles - This pass unpack machine instruction bundles.
LLVM_ABI FunctionPass * createUnreachableBlockEliminationPass()
createUnreachableBlockEliminationPass - The LLVM code generator does not work well with unreachable b...