LLVM 22.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
21
22#include <functional>
23#include <string>
24
25namespace llvm {
26
27class FunctionPass;
28class MachineFunction;
30class ModulePass;
31class Pass;
32class TargetMachine;
33class raw_ostream;
34enum class RunOutliner;
35
36template <typename T> class IntrusiveRefCntPtr;
37namespace vfs {
38class FileSystem;
39} // namespace vfs
40
41} // namespace llvm
42
43// List of target independent CodeGen pass IDs.
44namespace llvm {
45
46/// AtomicExpandPass - At IR level this pass replace atomic instructions with
47/// __atomic_* library calls, or target specific instruction which implement the
48/// same semantics in a way which better fits the target backend.
50
51/// createUnreachableBlockEliminationPass - The LLVM code generator does not
52/// work well with unreachable basic blocks (what live ranges make sense for a
53/// block that cannot be reached?). As such, a code generator should either
54/// not instruction select unreachable blocks, or run this pass as its
55/// last LLVM modifying pass to clean up blocks that are not reachable from
56/// the entry block.
58
59/// createGCEmptyBasicblocksPass - Empty basic blocks (basic blocks without
60/// real code) appear as the result of optimization passes removing
61/// instructions. These blocks confuscate profile analysis (e.g., basic block
62/// sections) since they will share the address of their fallthrough blocks.
63/// This pass garbage-collects such basic blocks.
65
66/// createBasicBlockSections Pass - This pass assigns sections to machine
67/// basic blocks and is enabled with -fbasic-block-sections.
69
71
72/// createBasicBlockMatchingAndInferencePass - This pass enables matching
73/// and inference when using propeller.
75
76/// createMachineBlockHashInfoPass - This pass computes basic block hashes.
78
79/// createMachineFunctionSplitterPass - This pass splits machine functions
80/// using profile information.
82
83/// createStaticDataSplitterPass - This is a machine-function pass that
84/// categorizes static data hotness using profile information.
86
87/// createStaticDataAnnotatorPASS - This is a module pass that reads from
88/// StaticDataProfileInfoWrapperPass and annotates the section prefix of
89/// global variables.
91
92/// MachineFunctionPrinter pass - This pass prints out the machine function to
93/// the given stream as a debugging tool.
96 const std::string &Banner = "");
97
98/// MIR2VecVocabPrinter pass - This pass prints out the MIR2Vec vocabulary
99/// contents to the given stream as a debugging tool.
102
103/// MIR2VecPrinter pass - This pass prints out the MIR2Vec embeddings for
104/// machine functions, basic blocks and instructions.
106
107/// StackFramePrinter pass - This pass prints out the machine function's
108/// stack frame to the given stream as a debugging tool.
110
111/// MIRPrinting pass - this pass prints out the LLVM IR into the given stream
112/// using the MIR serialization format.
114
115/// This pass resets a MachineFunction when it has the FailedISel property
116/// as if it was just created.
117/// If EmitFallbackDiag is true, the pass will emit a
118/// DiagnosticInfoISelFallback for every MachineFunction it resets.
119/// If AbortOnFailedISel is true, abort compilation instead of resetting.
121createResetMachineFunctionPass(bool EmitFallbackDiag, bool AbortOnFailedISel);
122
123/// createCodeGenPrepareLegacyPass - Transform the code to expose more pattern
124/// matching during instruction selection.
126
127/// This pass implements generation of target-specific intrinsics to support
128/// handling of complex number arithmetic
130
131/// AtomicExpandID -- Lowers atomic operations in terms of either cmpxchg
132/// load-linked/store-conditional loops.
133LLVM_ABI extern char &AtomicExpandID;
134
135/// MachineLoopInfo - This pass is a loop analysis pass.
136LLVM_ABI extern char &MachineLoopInfoID;
137
138/// MachineDominators - This pass is a machine dominators analysis pass.
139LLVM_ABI extern char &MachineDominatorsID;
140
141/// MachineDominanaceFrontier - This pass is a machine dominators analysis.
143
144/// MachineRegionInfo - This pass computes SESE regions for machine functions.
146
147/// EdgeBundles analysis - Bundle machine CFG edges.
149
150/// LiveVariables pass - This pass computes the set of blocks in which each
151/// variable is life and sets machine operand kill flags.
152LLVM_ABI extern char &LiveVariablesID;
153
154/// PHIElimination - This pass eliminates machine instruction PHI nodes
155/// by inserting copy instructions. This destroys SSA information, but is the
156/// desired input for some register allocators. This pass is "required" by
157/// these register allocator like this: AU.addRequiredID(PHIEliminationID);
158LLVM_ABI extern char &PHIEliminationID;
159
160/// LiveIntervals - This analysis keeps track of the live ranges of virtual
161/// and physical registers.
162LLVM_ABI extern char &LiveIntervalsID;
163
164/// LiveStacks pass. An analysis keeping track of the liveness of stack slots.
165LLVM_ABI extern char &LiveStacksID;
166
167/// TwoAddressInstruction - This pass reduces two-address instructions to
168/// use two operands. This destroys SSA information but it is desired by
169/// register allocators.
171
172/// ProcessImpicitDefs pass - This pass removes IMPLICIT_DEFs.
174
175/// RegisterCoalescer - This pass merges live ranges to eliminate copies.
176LLVM_ABI extern char &RegisterCoalescerID;
177
178/// MachineScheduler - This pass schedules machine instructions.
179LLVM_ABI extern char &MachineSchedulerID;
180
181/// PostMachineScheduler - This pass schedules machine instructions postRA.
183
184/// SpillPlacement analysis. Suggest optimal placement of spill code between
185/// basic blocks.
186LLVM_ABI extern char &SpillPlacementID;
187
188/// ShrinkWrap pass. Look for the best place to insert save and restore
189// instruction and update the MachineFunctionInfo with that information.
190LLVM_ABI extern char &ShrinkWrapID;
191
192/// LiveRangeShrink pass. Move instruction close to its definition to shrink
193/// the definition's live range.
194LLVM_ABI extern char &LiveRangeShrinkID;
195
196/// Greedy register allocator.
197LLVM_ABI extern char &RAGreedyLegacyID;
198
199/// Basic register allocator.
200LLVM_ABI extern char &RABasicID;
201
202/// VirtRegRewriter pass. Rewrite virtual registers to physical registers as
203/// assigned in VirtRegMap.
204LLVM_ABI extern char &VirtRegRewriterID;
205LLVM_ABI FunctionPass *createVirtRegRewriter(bool ClearVirtRegs = true);
206
207/// UnreachableMachineBlockElimination - This pass removes unreachable
208/// machine basic blocks.
210
211/// DeadMachineInstructionElim - This pass removes dead machine instructions.
213
214/// This pass adds dead/undef flags after analyzing subregister lanes.
215LLVM_ABI extern char &DetectDeadLanesID;
216
217/// This pass perform post-ra machine sink for COPY instructions.
219
220/// This pass adds flow sensitive discriminators.
222
223/// This pass reads flow sensitive profile.
225
226// This pass gives undef values a Pseudo Instruction definition for
227// Instructions to ensure early-clobber is followed when using the greedy
228// register allocator.
229LLVM_ABI extern char &InitUndefID;
230
231/// FastRegisterAllocation Pass - This pass register allocates as fast as
232/// possible. It is best suited for debug code where live ranges are short.
233///
236 bool ClearVirtRegs);
237
238/// BasicRegisterAllocation Pass - This pass implements a degenerate global
239/// register allocator using the basic regalloc framework.
240///
243
244/// Greedy register allocation pass - This pass implements a global register
245/// allocator for optimized builds.
246///
249
250/// PBQPRegisterAllocation Pass - This pass implements the Partitioned Boolean
251/// Quadratic Prograaming (PBQP) based register allocator.
252///
254
255/// PrologEpilogCodeInserter - This pass inserts prolog and epilog code,
256/// and eliminates abstract frame references.
259
260/// ExpandPostRAPseudos - This pass expands pseudo instructions after
261/// register allocation.
263
264/// PostRAHazardRecognizer - This pass runs the post-ra hazard
265/// recognizer.
267
268/// PostRAScheduler - This pass performs post register allocation
269/// scheduling.
270LLVM_ABI extern char &PostRASchedulerID;
271
272/// BranchFolding - This pass performs machine code CFG based
273/// optimizations to delete branches to branches, eliminate branches to
274/// successor blocks (creating fall throughs), and eliminating branches over
275/// branches.
276LLVM_ABI extern char &BranchFolderPassID;
277
278/// BranchRelaxation - This pass replaces branches that need to jump further
279/// than is supported by a branch instruction.
281
282/// MachineFunctionPrinterPass - This pass prints out MachineInstr's.
284
285/// MIRPrintingPass - this pass prints out the LLVM IR using the MIR
286/// serialization format.
287LLVM_ABI extern char &MIRPrintingPassID;
288
289/// TailDuplicate - Duplicate blocks with unconditional branches
290/// into tails of their predecessors.
292
293/// Duplicate blocks with unconditional branches into tails of their
294/// predecessors. Variant that works before register allocation.
296
297/// MachineTraceMetrics - This pass computes critical path and CPU resource
298/// usage in an ensemble of traces.
300
301/// EarlyIfConverter - This pass performs if-conversion on SSA form by
302/// inserting cmov instructions.
304
305/// EarlyIfPredicator - This pass performs if-conversion on SSA form by
306/// predicating if/else block and insert select at the join point.
307LLVM_ABI extern char &EarlyIfPredicatorID;
308
309/// This pass performs instruction combining using trace metrics to estimate
310/// critical-path and resource depth.
311LLVM_ABI extern char &MachineCombinerID;
312
313/// StackSlotColoring - This pass performs stack coloring and merging.
314/// It merges disjoint allocas to reduce the stack size.
316
317/// StackFramePrinter - This pass prints the stack frame layout and variable
318/// mappings.
320
321/// IfConverter - This pass performs machine code if conversion.
322LLVM_ABI extern char &IfConverterID;
323
325createIfConverter(std::function<bool(const MachineFunction &)> Ftor);
326
327/// MachineBlockPlacement - This pass places basic blocks based on branch
328/// probabilities.
330
331/// MachineBlockPlacementStats - This pass collects statistics about the
332/// basic block placement using branch probabilities and block frequency
333/// information.
335
336/// GCLowering Pass - Used by gc.root to perform its default lowering
337/// operations.
339
340/// GCLowering Pass - Used by gc.root to perform its default lowering
341/// operations.
342LLVM_ABI extern char &GCLoweringID;
343
344/// ShadowStackGCLowering - Implements the custom lowering mechanism
345/// used by the shadow stack GC. Only runs on functions which opt in to
346/// the shadow stack collector.
348
349/// ShadowStackGCLowering - Implements the custom lowering mechanism
350/// used by the shadow stack GC.
352
353/// GCMachineCodeAnalysis - Target-independent pass to mark safe points
354/// in machine code. Must be added very late during code generation, just
355/// prior to output, and importantly after all CFG transformations (such as
356/// branch folding).
358
359/// MachineCSE - This pass performs global CSE on machine instructions.
360LLVM_ABI extern char &MachineCSELegacyID;
361
362/// MIRCanonicalizer - This pass canonicalizes MIR by renaming vregs
363/// according to the semantics of the instruction as well as hoists
364/// code.
365LLVM_ABI extern char &MIRCanonicalizerID;
366
367/// ImplicitNullChecks - This pass folds null pointer checks into nearby
368/// memory operations.
369LLVM_ABI extern char &ImplicitNullChecksID;
370
371/// This pass performs loop invariant code motion on machine instructions.
372LLVM_ABI extern char &MachineLICMID;
373
374/// This pass performs loop invariant code motion on machine instructions.
375/// This variant works before register allocation. \see MachineLICMID.
376LLVM_ABI extern char &EarlyMachineLICMID;
377
378/// MachineSinking - This pass performs sinking on machine instructions.
380
381/// MachineCopyPropagation - This pass performs copy propagation on
382/// machine instructions.
384
386createMachineCopyPropagationPass(bool UseCopyInstr);
387
388/// MachineLateInstrsCleanup - This pass removes redundant identical
389/// instructions after register allocation and rematerialization.
391
392/// PeepholeOptimizer - This pass performs peephole optimizations -
393/// like extension and comparison eliminations.
395
396/// OptimizePHIs - This pass optimizes machine instruction PHIs
397/// to take advantage of opportunities created during DAG legalization.
398LLVM_ABI extern char &OptimizePHIsLegacyID;
399
400/// StackSlotColoring - This pass performs stack slot coloring.
401LLVM_ABI extern char &StackSlotColoringID;
402
403/// This pass lays out funclets contiguously.
404LLVM_ABI extern char &FuncletLayoutID;
405
406/// This pass inserts the XRay instrumentation sleds if they are supported by
407/// the target platform.
409
410/// This pass inserts FEntry calls
411LLVM_ABI extern char &FEntryInserterID;
412
413/// This pass implements the "patchable-function" attribute.
414LLVM_ABI extern char &PatchableFunctionID;
415
416/// createStackProtectorPass - This pass adds stack protectors to functions.
417///
419
420/// createMachineVerifierPass - This pass verifies cenerated machine code
421/// instructions for correctness.
422///
424
425/// createDwarfEHPass - This pass mulches exception handling code into a form
426/// adapted to code generation. Required if using dwarf exception handling.
428
429/// createWinEHPass - Prepares personality functions used by MSVC on Windows,
430/// in addition to the Itanium LSDA based personalities.
431LLVM_ABI FunctionPass *createWinEHPass(bool DemoteCatchSwitchPHIOnly = false);
432
433/// createSjLjEHPreparePass - This pass adapts exception handling code to use
434/// the GCC-style builtin setjmp/longjmp (sjlj) to handling EH control flow.
435///
437
438/// createWasmEHPass - This pass adapts exception handling code to use
439/// WebAssembly's exception handling scheme.
441
442/// LocalStackSlotAllocation - This pass assigns local frame indices to stack
443/// slots relative to one another and allocates base registers to access them
444/// when it is estimated by the target to be out of range of normal frame
445/// pointer or stack pointer index addressing.
447
448/// This pass expands pseudo-instructions, reserves registers and adjusts
449/// machine frame information.
450LLVM_ABI extern char &FinalizeISelID;
451
452/// UnpackMachineBundles - This pass unpack machine instruction bundles.
454
456createUnpackMachineBundles(std::function<bool(const MachineFunction &)> Ftor);
457
458/// StackMapLiveness - This pass analyses the register live-out set of
459/// stackmap/patchpoint intrinsics and attaches the calculated information to
460/// the intrinsic for later emission to the StackMap.
461LLVM_ABI extern char &StackMapLivenessID;
462
463// MachineSanitizerBinaryMetadata - appends/finalizes sanitizer binary
464// metadata after llvm SanitizerBinaryMetadata pass.
466
467/// RemoveLoadsIntoFakeUses pass.
469
470/// RemoveRedundantDebugValues pass.
472
473/// MachineCFGPrinter pass.
474LLVM_ABI extern char &MachineCFGPrinterID;
475
476/// LiveDebugValues pass
477LLVM_ABI extern char &LiveDebugValuesID;
478
479/// InterleavedAccess Pass - This pass identifies and matches interleaved
480/// memory accesses to target specific intrinsics.
481///
483
484/// InterleavedLoadCombines Pass - This pass identifies interleaved loads and
485/// combines them into wide loads detectable by InterleavedAccessPass
486///
488
489/// LowerEmuTLS - This pass generates __emutls_[vt].xyz variables for all
490/// TLS variables for the emulated TLS model.
491///
493
494/// This pass lowers the \@llvm.load.relative and \@llvm.objc.* intrinsics to
495/// instructions. This is unsafe to do earlier because a pass may combine the
496/// constant initializer into the load, which may result in an overflowing
497/// evaluation.
499
500/// GlobalMerge - This pass merges internal (by default) globals into structs
501/// to enable reuse of a base pointer by indexed addressing modes.
502/// It can also be configured to focus on size optimizations only.
503///
505createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset,
506 bool OnlyOptimizeForSize = false,
507 bool MergeExternalByDefault = false,
508 bool MergeConstantByDefault = false,
509 bool MergeConstAggressiveByDefault = false);
510
511/// This pass splits the stack into a safe stack and an unsafe stack to
512/// protect against stack-based overflow vulnerabilities.
514
515/// This pass detects subregister lanes in a virtual register that are used
516/// independently of other lanes and splits them into separate virtual
517/// registers.
519
520/// This pass is executed POST-RA to collect which physical registers are
521/// preserved by given machine function.
523
524/// Return a MachineFunction pass that identifies call sites
525/// and propagates register usage information of callee to caller
526/// if available with PysicalRegisterUsageInfo pass.
528
529/// This pass performs software pipelining on machine instructions.
530LLVM_ABI extern char &MachinePipelinerID;
531
532/// This pass frees the memory occupied by the MachineFunction.
534
535/// This pass performs merging similar functions globally.
537
538/// This pass performs outlining on machine instructions directly before
539/// printing assembly.
541
542/// This pass expands the reduction intrinsics into sequences of shuffles.
544
545// This pass replaces intrinsics operating on vector operands with calls to
546// the corresponding function in a vector library (e.g., SVML, libmvec).
548
549// Expands large div/rem instructions.
551
552// Expands large div/rem instructions.
554
555// This pass expands memcmp() to load/stores.
557
558/// Creates Break False Dependencies pass. \see BreakFalseDeps.cpp
560
561// This pass expands indirectbr instructions.
563
564/// Creates CFI Fixup pass. \see CFIFixup.cpp
566
567/// Creates CFI Instruction Inserter pass. \see CFIInstrInserter.cpp
569
570// Expands floating point instructions.
572
573/// Creates CFGuard longjmp target identification pass.
574/// \see CFGuardLongjmp.cpp
576
577/// Creates Windows EH Continuation Guard target identification pass.
578/// \see EHContGuardTargets.cpp
580
581/// Create Hardware Loop pass. \see HardwareLoops.cpp
583
584/// This pass inserts pseudo probe annotation for callsite profiling.
586
587/// Create IR Type Promotion pass. \see TypePromotion.cpp
589
590/// Add Flow Sensitive Discriminators. PassNum specifies the
591/// sequence number of this pass (starting from 1).
594
595/// Read Flow Sensitive Profile.
597createMIRProfileLoaderPass(std::string File, std::string RemappingFile,
600
601/// Creates MIR Debugify pass. \see MachineDebugify.cpp
603
604/// Creates MIR Strip Debug pass. \see MachineStripDebug.cpp
605/// If OnlyDebugified is true then it will only strip debug info if it was
606/// added by a Debugify pass. The module will be left unchanged if the debug
607/// info was generated by another source such as clang.
609
610/// Creates MIR Check Debug pass. \see MachineCheckDebugify.cpp
612
613/// The pass fixups statepoint machine instruction to replace usage of
614/// caller saved registers with stack slots.
616
617/// When learning an eviction policy, extract score(reward) information,
618/// otherwise this does nothing
620
621/// JMC instrument pass.
623
624/// This pass converts conditional moves to conditional jumps when profitable.
626
628
629/// Creates Windows Secure Hot Patch pass. \see WindowsSecureHotPatching.cpp
631
632/// Lowers KCFI operand bundles for indirect calls.
634} // namespace llvm
635
636#endif
#define LLVM_ABI
Definition Compiler.h:213
#define F(x, y, z)
Definition MD5.cpp:54
#define P(N)
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
The virtual file system interface.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI FunctionPass * createCFIFixup()
Creates CFI Fixup pass.
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 char & MachineCFGPrinterID
MachineCFGPrinter 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 FunctionPass * createCallBrPass()
LLVM_ABI ModulePass * createStripDebugMachineModulePass(bool OnlyDebugified)
Creates MIR Strip Debug pass.
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 char & PatchableFunctionID
This pass implements the "patchable-function" attribute.
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 MachineFunctionPass * createGCEmptyBasicBlocksPass()
createGCEmptyBasicblocksPass - Empty basic blocks (basic blocks without real code) appear as the resu...
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 char & EarlyIfConverterLegacyID
EarlyIfConverter - This pass performs if-conversion on SSA form by inserting cmov instructions.
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 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 MachineFunctionPass * createStaticDataSplitterPass()
createStaticDataSplitterPass - This is a machine-function pass that categorizes static data hotness u...
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 * createExpandMemCmpLegacyPass()
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:673
LLVM_ABI FunctionPass * createKCFIPass()
Lowers KCFI operand bundles for indirect calls.
Definition KCFI.cpp:61
LLVM_ABI MachineFunctionPass * createResetMachineFunctionPass(bool EmitFallbackDiag, bool AbortOnFailedISel)
This pass resets a MachineFunction when it has the FailedISel property as if it was just created.
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 & MIRPrintingPassID
MIRPrintingPass - this pass prints out the LLVM IR using the MIR serialization format.
LLVM_ABI char & StackMapLivenessID
StackMapLiveness - This pass analyses the register live-out set of stackmap/patchpoint intrinsics and...
LLVM_ABI ModulePass * createStaticDataAnnotatorPass()
createStaticDataAnnotatorPASS - This is a module pass that reads from StaticDataProfileInfoWrapperPas...
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:82
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 * createExpandLargeDivRemPass()
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 ModulePass * createCheckDebugMachineModulePass()
Creates MIR Check Debug pass.
LLVM_ABI FunctionPass * createBreakFalseDeps()
Creates Break False Dependencies pass.
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:620
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 FunctionPass * createUnpackMachineBundles(std::function< bool(const MachineFunction &)> Ftor)
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 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 * createEHContGuardTargetsPass()
Creates Windows EH Continuation Guard target identification pass.
LLVM_ABI FunctionPass * createGCLoweringPass()
GCLowering Pass - Used by gc.root to perform its default lowering operations.
LLVM_ABI FunctionPass * createReplaceWithVeclibLegacyPass()
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 FunctionPass * createShadowStackGCLoweringPass()
ShadowStackGCLowering - Implements the custom lowering mechanism used by the shadow stack GC.
LLVM_ABI FunctionPass * createExpandFpPass()
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 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 * createCFIInstrInserter()
Creates CFI Instruction Inserter pass.
LLVM_ABI ModulePass * createWindowsSecureHotPatchingPass()
Creates Windows Secure Hot Patch 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 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...