LLVM 17.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
20
21#include <functional>
22#include <string>
23
24namespace llvm {
25
26class FunctionPass;
27class MachineFunction;
28class MachineFunctionPass;
29class ModulePass;
30class Pass;
31class TargetMachine;
32class raw_ostream;
33
34template <typename T> class IntrusiveRefCntPtr;
35namespace vfs {
36class FileSystem;
37} // namespace vfs
38
39} // End llvm namespace
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 /// createBasicBlockSections Pass - This pass assigns sections to machine
58 /// basic blocks and is enabled with -fbasic-block-sections.
60
61 /// createMachineFunctionSplitterPass - This pass splits machine functions
62 /// using profile information.
64
65 /// MachineFunctionPrinter pass - This pass prints out the machine function to
66 /// the given stream as a debugging tool.
69 const std::string &Banner ="");
70
71 /// StackFramePrinter pass - This pass prints out the machine function's
72 /// stack frame to the given stream as a debugging tool.
74
75 /// MIRPrinting pass - this pass prints out the LLVM IR into the given stream
76 /// using the MIR serialization format.
78
79 /// This pass resets a MachineFunction when it has the FailedISel property
80 /// as if it was just created.
81 /// If EmitFallbackDiag is true, the pass will emit a
82 /// DiagnosticInfoISelFallback for every MachineFunction it resets.
83 /// If AbortOnFailedISel is true, abort compilation instead of resetting.
85 bool AbortOnFailedISel);
86
87 /// createCodeGenPreparePass - Transform the code to expose more pattern
88 /// matching during instruction selection.
90
91 /// This pass implements generation of target-specific intrinsics to support
92 /// handling of complex number arithmetic
94
95 /// AtomicExpandID -- Lowers atomic operations in terms of either cmpxchg
96 /// load-linked/store-conditional loops.
97 extern char &AtomicExpandID;
98
99 /// MachineLoopInfo - This pass is a loop analysis pass.
100 extern char &MachineLoopInfoID;
101
102 /// MachineDominators - This pass is a machine dominators analysis pass.
103 extern char &MachineDominatorsID;
104
105 /// MachineDominanaceFrontier - This pass is a machine dominators analysis.
106 extern char &MachineDominanceFrontierID;
107
108 /// MachineRegionInfo - This pass computes SESE regions for machine functions.
109 extern char &MachineRegionInfoPassID;
110
111 /// EdgeBundles analysis - Bundle machine CFG edges.
112 extern char &EdgeBundlesID;
113
114 /// LiveVariables pass - This pass computes the set of blocks in which each
115 /// variable is life and sets machine operand kill flags.
116 extern char &LiveVariablesID;
117
118 /// PHIElimination - This pass eliminates machine instruction PHI nodes
119 /// by inserting copy instructions. This destroys SSA information, but is the
120 /// desired input for some register allocators. This pass is "required" by
121 /// these register allocator like this: AU.addRequiredID(PHIEliminationID);
122 extern char &PHIEliminationID;
123
124 /// LiveIntervals - This analysis keeps track of the live ranges of virtual
125 /// and physical registers.
126 extern char &LiveIntervalsID;
127
128 /// LiveStacks pass. An analysis keeping track of the liveness of stack slots.
129 extern char &LiveStacksID;
130
131 /// TwoAddressInstruction - This pass reduces two-address instructions to
132 /// use two operands. This destroys SSA information but it is desired by
133 /// register allocators.
134 extern char &TwoAddressInstructionPassID;
135
136 /// ProcessImpicitDefs pass - This pass removes IMPLICIT_DEFs.
137 extern char &ProcessImplicitDefsID;
138
139 /// RegisterCoalescer - This pass merges live ranges to eliminate copies.
140 extern char &RegisterCoalescerID;
141
142 /// MachineScheduler - This pass schedules machine instructions.
143 extern char &MachineSchedulerID;
144
145 /// PostMachineScheduler - This pass schedules machine instructions postRA.
146 extern char &PostMachineSchedulerID;
147
148 /// SpillPlacement analysis. Suggest optimal placement of spill code between
149 /// basic blocks.
150 extern char &SpillPlacementID;
151
152 /// ShrinkWrap pass. Look for the best place to insert save and restore
153 // instruction and update the MachineFunctionInfo with that information.
154 extern char &ShrinkWrapID;
155
156 /// LiveRangeShrink pass. Move instruction close to its definition to shrink
157 /// the definition's live range.
158 extern char &LiveRangeShrinkID;
159
160 /// Greedy register allocator.
161 extern char &RAGreedyID;
162
163 /// Basic register allocator.
164 extern char &RABasicID;
165
166 /// VirtRegRewriter pass. Rewrite virtual registers to physical registers as
167 /// assigned in VirtRegMap.
168 extern char &VirtRegRewriterID;
169 FunctionPass *createVirtRegRewriter(bool ClearVirtRegs = true);
170
171 /// UnreachableMachineBlockElimination - This pass removes unreachable
172 /// machine basic blocks.
174
175 /// DeadMachineInstructionElim - This pass removes dead machine instructions.
176 extern char &DeadMachineInstructionElimID;
177
178 /// This pass adds dead/undef flags after analyzing subregister lanes.
179 extern char &DetectDeadLanesID;
180
181 /// This pass perform post-ra machine sink for COPY instructions.
182 extern char &PostRAMachineSinkingID;
183
184 /// This pass adds flow sensitive discriminators.
185 extern char &MIRAddFSDiscriminatorsID;
186
187 /// This pass reads flow sensitive profile.
188 extern char &MIRProfileLoaderPassID;
189
190 /// FastRegisterAllocation Pass - This pass register allocates as fast as
191 /// possible. It is best suited for debug code where live ranges are short.
192 ///
195 bool ClearVirtRegs);
196
197 /// BasicRegisterAllocation Pass - This pass implements a degenerate global
198 /// register allocator using the basic regalloc framework.
199 ///
202
203 /// Greedy register allocation pass - This pass implements a global register
204 /// allocator for optimized builds.
205 ///
208
209 /// PBQPRegisterAllocation Pass - This pass implements the Partitioned Boolean
210 /// Quadratic Prograaming (PBQP) based register allocator.
211 ///
213
214 /// PrologEpilogCodeInserter - This pass inserts prolog and epilog code,
215 /// and eliminates abstract frame references.
216 extern char &PrologEpilogCodeInserterID;
218
219 /// ExpandPostRAPseudos - This pass expands pseudo instructions after
220 /// register allocation.
221 extern char &ExpandPostRAPseudosID;
222
223 /// PostRAHazardRecognizer - This pass runs the post-ra hazard
224 /// recognizer.
225 extern char &PostRAHazardRecognizerID;
226
227 /// PostRAScheduler - This pass performs post register allocation
228 /// scheduling.
229 extern char &PostRASchedulerID;
230
231 /// BranchFolding - This pass performs machine code CFG based
232 /// optimizations to delete branches to branches, eliminate branches to
233 /// successor blocks (creating fall throughs), and eliminating branches over
234 /// branches.
235 extern char &BranchFolderPassID;
236
237 /// BranchRelaxation - This pass replaces branches that need to jump further
238 /// than is supported by a branch instruction.
239 extern char &BranchRelaxationPassID;
240
241 /// MachineFunctionPrinterPass - This pass prints out MachineInstr's.
242 extern char &MachineFunctionPrinterPassID;
243
244 /// MIRPrintingPass - this pass prints out the LLVM IR using the MIR
245 /// serialization format.
246 extern char &MIRPrintingPassID;
247
248 /// TailDuplicate - Duplicate blocks with unconditional branches
249 /// into tails of their predecessors.
250 extern char &TailDuplicateID;
251
252 /// Duplicate blocks with unconditional branches into tails of their
253 /// predecessors. Variant that works before register allocation.
254 extern char &EarlyTailDuplicateID;
255
256 /// MachineTraceMetrics - This pass computes critical path and CPU resource
257 /// usage in an ensemble of traces.
258 extern char &MachineTraceMetricsID;
259
260 /// EarlyIfConverter - This pass performs if-conversion on SSA form by
261 /// inserting cmov instructions.
262 extern char &EarlyIfConverterID;
263
264 /// EarlyIfPredicator - This pass performs if-conversion on SSA form by
265 /// predicating if/else block and insert select at the join point.
266 extern char &EarlyIfPredicatorID;
267
268 /// This pass performs instruction combining using trace metrics to estimate
269 /// critical-path and resource depth.
270 extern char &MachineCombinerID;
271
272 /// StackSlotColoring - This pass performs stack coloring and merging.
273 /// It merges disjoint allocas to reduce the stack size.
274 extern char &StackColoringID;
275
276 /// StackFramePrinter - This pass prints the stack frame layout and variable
277 /// mappings.
279
280 /// IfConverter - This pass performs machine code if conversion.
281 extern char &IfConverterID;
282
284 std::function<bool(const MachineFunction &)> Ftor);
285
286 /// MachineBlockPlacement - This pass places basic blocks based on branch
287 /// probabilities.
288 extern char &MachineBlockPlacementID;
289
290 /// MachineBlockPlacementStats - This pass collects statistics about the
291 /// basic block placement using branch probabilities and block frequency
292 /// information.
293 extern char &MachineBlockPlacementStatsID;
294
295 /// GCLowering Pass - Used by gc.root to perform its default lowering
296 /// operations.
298
299 /// GCLowering Pass - Used by gc.root to perform its default lowering
300 /// operations.
301 extern char &GCLoweringID;
302
303 /// ShadowStackGCLowering - Implements the custom lowering mechanism
304 /// used by the shadow stack GC. Only runs on functions which opt in to
305 /// the shadow stack collector.
307
308 /// ShadowStackGCLowering - Implements the custom lowering mechanism
309 /// used by the shadow stack GC.
310 extern char &ShadowStackGCLoweringID;
311
312 /// GCMachineCodeAnalysis - Target-independent pass to mark safe points
313 /// in machine code. Must be added very late during code generation, just
314 /// prior to output, and importantly after all CFG transformations (such as
315 /// branch folding).
316 extern char &GCMachineCodeAnalysisID;
317
318 /// Creates a pass to print GC metadata.
319 ///
321
322 /// MachineCSE - This pass performs global CSE on machine instructions.
323 extern char &MachineCSEID;
324
325 /// MIRCanonicalizer - This pass canonicalizes MIR by renaming vregs
326 /// according to the semantics of the instruction as well as hoists
327 /// code.
328 extern char &MIRCanonicalizerID;
329
330 /// ImplicitNullChecks - This pass folds null pointer checks into nearby
331 /// memory operations.
332 extern char &ImplicitNullChecksID;
333
334 /// This pass performs loop invariant code motion on machine instructions.
335 extern char &MachineLICMID;
336
337 /// This pass performs loop invariant code motion on machine instructions.
338 /// This variant works before register allocation. \see MachineLICMID.
339 extern char &EarlyMachineLICMID;
340
341 /// MachineSinking - This pass performs sinking on machine instructions.
342 extern char &MachineSinkingID;
343
344 /// MachineCopyPropagation - This pass performs copy propagation on
345 /// machine instructions.
346 extern char &MachineCopyPropagationID;
347
349
350 /// MachineLateInstrsCleanup - This pass removes redundant identical
351 /// instructions after register allocation and rematerialization.
352 extern char &MachineLateInstrsCleanupID;
353
354 /// PeepholeOptimizer - This pass performs peephole optimizations -
355 /// like extension and comparison eliminations.
356 extern char &PeepholeOptimizerID;
357
358 /// OptimizePHIs - This pass optimizes machine instruction PHIs
359 /// to take advantage of opportunities created during DAG legalization.
360 extern char &OptimizePHIsID;
361
362 /// StackSlotColoring - This pass performs stack slot coloring.
363 extern char &StackSlotColoringID;
364
365 /// This pass lays out funclets contiguously.
366 extern char &FuncletLayoutID;
367
368 /// This pass inserts the XRay instrumentation sleds if they are supported by
369 /// the target platform.
370 extern char &XRayInstrumentationID;
371
372 /// This pass inserts FEntry calls
373 extern char &FEntryInserterID;
374
375 /// This pass implements the "patchable-function" attribute.
376 extern char &PatchableFunctionID;
377
378 /// createStackProtectorPass - This pass adds stack protectors to functions.
379 ///
381
382 /// createMachineVerifierPass - This pass verifies cenerated machine code
383 /// instructions for correctness.
384 ///
385 FunctionPass *createMachineVerifierPass(const std::string& Banner);
386
387 /// createDwarfEHPass - This pass mulches exception handling code into a form
388 /// adapted to code generation. Required if using dwarf exception handling.
390
391 /// createWinEHPass - Prepares personality functions used by MSVC on Windows,
392 /// in addition to the Itanium LSDA based personalities.
393 FunctionPass *createWinEHPass(bool DemoteCatchSwitchPHIOnly = false);
394
395 /// createSjLjEHPreparePass - This pass adapts exception handling code to use
396 /// the GCC-style builtin setjmp/longjmp (sjlj) to handling EH control flow.
397 ///
399
400 /// createWasmEHPass - This pass adapts exception handling code to use
401 /// WebAssembly's exception handling scheme.
403
404 /// LocalStackSlotAllocation - This pass assigns local frame indices to stack
405 /// slots relative to one another and allocates base registers to access them
406 /// when it is estimated by the target to be out of range of normal frame
407 /// pointer or stack pointer index addressing.
408 extern char &LocalStackSlotAllocationID;
409
410 /// This pass expands pseudo-instructions, reserves registers and adjusts
411 /// machine frame information.
412 extern char &FinalizeISelID;
413
414 /// UnpackMachineBundles - This pass unpack machine instruction bundles.
415 extern char &UnpackMachineBundlesID;
416
418 createUnpackMachineBundles(std::function<bool(const MachineFunction &)> Ftor);
419
420 /// FinalizeMachineBundles - This pass finalize machine instruction
421 /// bundles (created earlier, e.g. during pre-RA scheduling).
422 extern char &FinalizeMachineBundlesID;
423
424 /// StackMapLiveness - This pass analyses the register live-out set of
425 /// stackmap/patchpoint intrinsics and attaches the calculated information to
426 /// the intrinsic for later emission to the StackMap.
427 extern char &StackMapLivenessID;
428
429 // MachineSanitizerBinaryMetadata - appends/finalizes sanitizer binary
430 // metadata after llvm SanitizerBinaryMetadata pass.
432
433 /// RemoveRedundantDebugValues pass.
434 extern char &RemoveRedundantDebugValuesID;
435
436 /// MachineCFGPrinter pass.
437 extern char &MachineCFGPrinterID;
438
439 /// LiveDebugValues pass
440 extern char &LiveDebugValuesID;
441
442 /// createJumpInstrTables - This pass creates jump-instruction tables.
444
445 /// InterleavedAccess Pass - This pass identifies and matches interleaved
446 /// memory accesses to target specific intrinsics.
447 ///
449
450 /// InterleavedLoadCombines Pass - This pass identifies interleaved loads and
451 /// combines them into wide loads detectable by InterleavedAccessPass
452 ///
454
455 /// LowerEmuTLS - This pass generates __emutls_[vt].xyz variables for all
456 /// TLS variables for the emulated TLS model.
457 ///
459
460 /// This pass lowers the \@llvm.load.relative and \@llvm.objc.* intrinsics to
461 /// instructions. This is unsafe to do earlier because a pass may combine the
462 /// constant initializer into the load, which may result in an overflowing
463 /// evaluation.
465
466 /// GlobalMerge - This pass merges internal (by default) globals into structs
467 /// to enable reuse of a base pointer by indexed addressing modes.
468 /// It can also be configured to focus on size optimizations only.
469 ///
470 Pass *createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset,
471 bool OnlyOptimizeForSize = false,
472 bool MergeExternalByDefault = false);
473
474 /// This pass splits the stack into a safe stack and an unsafe stack to
475 /// protect against stack-based overflow vulnerabilities.
477
478 /// This pass detects subregister lanes in a virtual register that are used
479 /// independently of other lanes and splits them into separate virtual
480 /// registers.
481 extern char &RenameIndependentSubregsID;
482
483 /// This pass is executed POST-RA to collect which physical registers are
484 /// preserved by given machine function.
486
487 /// Return a MachineFunction pass that identifies call sites
488 /// and propagates register usage information of callee to caller
489 /// if available with PysicalRegisterUsageInfo pass.
491
492 /// This pass performs software pipelining on machine instructions.
493 extern char &MachinePipelinerID;
494
495 /// This pass frees the memory occupied by the MachineFunction.
497
498 /// This pass performs outlining on machine instructions directly before
499 /// printing assembly.
500 ModulePass *createMachineOutlinerPass(bool RunOnAllFunctions = true);
501
502 /// This pass expands the experimental reduction intrinsics into sequences of
503 /// shuffles.
505
506 // This pass replaces intrinsics operating on vector operands with calls to
507 // the corresponding function in a vector library (e.g., SVML, libmvec).
509
510 /// This pass expands the vector predication intrinsics into unpredicated
511 /// instructions with selects or just the explicit vector length into the
512 /// predicate mask.
514
515 // Expands large div/rem instructions.
517
518 // Expands large div/rem instructions.
520
521 // This pass expands memcmp() to load/stores.
523
524 /// Creates Break False Dependencies pass. \see BreakFalseDeps.cpp
526
527 // This pass expands indirectbr instructions.
529
530 /// Creates CFI Fixup pass. \see CFIFixup.cpp
532
533 /// Creates CFI Instruction Inserter pass. \see CFIInstrInserter.cpp
535
536 /// Creates CFGuard longjmp target identification pass.
537 /// \see CFGuardLongjmp.cpp
539
540 /// Creates EHContGuard catchret target identification pass.
541 /// \see EHContGuardCatchret.cpp
543
544 /// Create Hardware Loop pass. \see HardwareLoops.cpp
546
547 /// This pass inserts pseudo probe annotation for callsite profiling.
549
550 /// Create IR Type Promotion pass. \see TypePromotion.cpp
552
553 /// Add Flow Sensitive Discriminators. PassNum specifies the
554 /// sequence number of this pass (starting from 1).
557
558 /// Read Flow Sensitive Profile.
560 createMIRProfileLoaderPass(std::string File, std::string RemappingFile,
563
564 /// Creates MIR Debugify pass. \see MachineDebugify.cpp
566
567 /// Creates MIR Strip Debug pass. \see MachineStripDebug.cpp
568 /// If OnlyDebugified is true then it will only strip debug info if it was
569 /// added by a Debugify pass. The module will be left unchanged if the debug
570 /// info was generated by another source such as clang.
571 ModulePass *createStripDebugMachineModulePass(bool OnlyDebugified);
572
573 /// Creates MIR Check Debug pass. \see MachineCheckDebugify.cpp
575
576 /// The pass fixups statepoint machine instruction to replace usage of
577 /// caller saved registers with stack slots.
578 extern char &FixupStatepointCallerSavedID;
579
580 /// The pass transforms load/store <256 x i32> to AMX load/store intrinsics
581 /// or split the data to two <128 x i32>.
583
584 /// The pass insert tile config intrinsics for AMX fast register allocation.
586
587 /// The pass transforms amx intrinsics to scalar operation if the function has
588 /// optnone attribute or it is O0.
590
591 /// When learning an eviction policy, extract score(reward) information,
592 /// otherwise this does nothing
594
595 /// JMC instrument pass.
597
598 /// This pass converts conditional moves to conditional jumps when profitable.
600} // End llvm namespace
601
602#endif
print lazy value Lazy Value Info Printer Pass
#define F(x, y, z)
Definition: MD5.cpp:55
#define P(N)
const char LLVMTargetMachineRef TM
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:308
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:248
Pass interface - Implemented by all 'passes'.
Definition: Pass.h:91
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:78
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
Level
Code generation optimization level.
Definition: CodeGen.h:57
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
FunctionPass * createIndirectBrExpandPass()
char & FinalizeMachineBundlesID
FinalizeMachineBundles - This pass finalize machine instruction bundles (created earlier,...
FunctionPass * createFastRegisterAllocator()
FastRegisterAllocation Pass - This pass register allocates as fast as possible.
char & EarlyMachineLICMID
This pass performs loop invariant code motion on machine instructions.
char & GCMachineCodeAnalysisID
GCMachineCodeAnalysis - Target-independent pass to mark safe points in machine code.
char & PostRAHazardRecognizerID
PostRAHazardRecognizer - This pass runs the post-ra hazard recognizer.
ModulePass * createPreISelIntrinsicLoweringPass()
This pass lowers the @llvm.load.relative and @llvm.objc.
char & MachineDominanceFrontierID
MachineDominanaceFrontier - This pass is a machine dominators analysis.
char & FEntryInserterID
This pass inserts FEntry calls.
FunctionPass * createGCLoweringPass()
GCLowering Pass - Used by gc.root to perform its default lowering operations.
FunctionPass * createUnreachableBlockEliminationPass()
createUnreachableBlockEliminationPass - The LLVM code generator does not work well with unreachable b...
FunctionPass * createSjLjEHPreparePass(const TargetMachine *TM)
createSjLjEHPreparePass - This pass adapts exception handling code to use the GCC-style builtin setjm...
char & GCLoweringID
GCLowering Pass - Used by gc.root to perform its default lowering operations.
FunctionPass * createIfConverter(std::function< bool(const MachineFunction &)> Ftor)
char & RegisterCoalescerID
RegisterCoalescer - This pass merges live ranges to eliminate copies.
FunctionPass * createTypePromotionLegacyPass()
Create IR Type Promotion pass.
FunctionPass * createGreedyRegisterAllocator()
Greedy register allocation pass - This pass implements a global register allocator for optimized buil...
MachineFunctionPass * createPrintMIRPass(raw_ostream &OS)
MIRPrinting pass - this pass prints out the LLVM IR into the given stream using the MIR serialization...
char & OptimizePHIsID
OptimizePHIs - This pass optimizes machine instruction PHIs to take advantage of opportunities create...
FunctionPass * createSafeStackPass()
This pass splits the stack into a safe stack and an unsafe stack to protect against stack-based overf...
Definition: SafeStack.cpp:939
char & EarlyTailDuplicateID
Duplicate blocks with unconditional branches into tails of their predecessors.
char & MachineRegionInfoPassID
MachineRegionInfo - This pass computes SESE regions for machine functions.
char & EdgeBundlesID
EdgeBundles analysis - Bundle machine CFG edges.
char & MachineCFGPrinterID
MachineCFGPrinter pass.
char & MachineSinkingID
MachineSinking - This pass performs sinking on machine instructions.
FunctionPass * createSelectOptimizePass()
This pass converts conditional moves to conditional jumps when profitable.
FunctionPass * createAtomicExpandPass()
AtomicExpandPass - At IR level this pass replace atomic instructions with __atomic_* library calls,...
FunctionPass * createWasmEHPass()
createWasmEHPass - This pass adapts exception handling code to use WebAssembly's exception handling s...
char & FixupStatepointCallerSavedID
The pass fixups statepoint machine instruction to replace usage of caller saved registers with stack ...
FunctionPass * createExpandVectorPredicationPass()
This pass expands the vector predication intrinsics into unpredicated instructions with selects or ju...
MachineFunctionPass * createBasicBlockSectionsPass()
createBasicBlockSections Pass - This pass assigns sections to machine basic blocks and is enabled wit...
FunctionPass * createPseudoProbeInserter()
This pass inserts pseudo probe annotation for callsite profiling.
MachineFunctionPass * createPrologEpilogInserterPass()
char & TailDuplicateID
TailDuplicate - Duplicate blocks with unconditional branches into tails of their predecessors.
ModulePass * createStripDebugMachineModulePass(bool OnlyDebugified)
Creates MIR Strip Debug pass.
FunctionPass * createX86LowerAMXIntrinsicsPass()
The pass transforms amx intrinsics to scalar operation if the function has optnone attribute or it is...
char & ExpandPostRAPseudosID
ExpandPostRAPseudos - This pass expands pseudo instructions after register allocation.
char & PatchableFunctionID
This pass implements the "patchable-function" attribute.
ModulePass * createLowerEmuTLSPass()
LowerEmuTLS - This pass generates __emutls_[vt].xyz variables for all TLS variables for the emulated ...
char & PostRASchedulerID
PostRAScheduler - This pass performs post register allocation scheduling.
char & MIRProfileLoaderPassID
This pass reads flow sensitive profile.
FunctionPass * createStackProtectorPass()
createStackProtectorPass - This pass adds stack protectors to functions.
char & RAGreedyID
Greedy register allocator.
char & MIRCanonicalizerID
MIRCanonicalizer - This pass canonicalizes MIR by renaming vregs according to the semantics of the in...
char & MachineSchedulerID
MachineScheduler - This pass schedules machine instructions.
char & PeepholeOptimizerID
PeepholeOptimizer - This pass performs peephole optimizations - like extension and comparison elimina...
char & PostMachineSchedulerID
PostMachineScheduler - This pass schedules machine instructions postRA.
char & LiveDebugValuesID
LiveDebugValues pass.
char & PrologEpilogCodeInserterID
PrologEpilogCodeInserter - This pass inserts prolog and epilog code, and eliminates abstract frame re...
FunctionPass * createExpandLargeFpConvertPass()
char & MachineDominatorsID
MachineDominators - This pass is a machine dominators analysis pass.
FunctionPass * createDwarfEHPass(CodeGenOpt::Level OptLevel)
createDwarfEHPass - This pass mulches exception handling code into a form adapted to code generation.
char & SpillPlacementID
SpillPlacement analysis.
ModulePass * createJMCInstrumenterPass()
JMC instrument pass.
char & MachineLoopInfoID
MachineLoopInfo - This pass is a loop analysis pass.
char & ShadowStackGCLoweringID
ShadowStackGCLowering - Implements the custom lowering mechanism used by the shadow stack GC.
char & MachineCombinerID
This pass performs instruction combining using trace metrics to estimate critical-path and resource d...
MachineFunctionPass * createStackFrameLayoutAnalysisPass()
StackFramePrinter pass - This pass prints out the machine function's stack frame to the given stream ...
FunctionPass * createMIRAddFSDiscriminatorsPass(sampleprof::FSDiscriminatorPass P)
Add Flow Sensitive Discriminators.
char & MachineSanitizerBinaryMetadataID
char & ImplicitNullChecksID
ImplicitNullChecks - This pass folds null pointer checks into nearby memory operations.
char & ShrinkWrapID
ShrinkWrap pass. Look for the best place to insert save and restore.
Definition: ShrinkWrap.cpp:250
char & MachineLateInstrsCleanupID
MachineLateInstrsCleanup - This pass removes redundant identical instructions after register allocati...
char & BranchRelaxationPassID
BranchRelaxation - This pass replaces branches that need to jump further than is supported by a branc...
FunctionPass * createRegUsageInfoCollector()
This pass is executed POST-RA to collect which physical registers are preserved by given machine func...
FunctionPass * createComplexDeinterleavingPass(const TargetMachine *TM)
This pass implements generation of target-specific intrinsics to support handling of complex number a...
char & LiveRangeShrinkID
LiveRangeShrink pass.
FunctionPass * createExpandMemCmpPass()
Pass * createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset, bool OnlyOptimizeForSize=false, bool MergeExternalByDefault=false)
GlobalMerge - This pass merges internal (by default) globals into structs to enable reuse of a base p...
char & LiveStacksID
LiveStacks pass. An analysis keeping track of the liveness of stack slots.
Definition: LiveStacks.cpp:30
char & XRayInstrumentationID
This pass inserts the XRay instrumentation sleds if they are supported by the target platform.
char & MIRPrintingPassID
MIRPrintingPass - this pass prints out the LLVM IR using the MIR serialization format.
char & StackMapLivenessID
StackMapLiveness - This pass analyses the register live-out set of stackmap/patchpoint intrinsics and...
char & StackFrameLayoutAnalysisPassID
StackFramePrinter - This pass prints the stack frame layout and variable mappings.
char & FuncletLayoutID
This pass lays out funclets contiguously.
FunctionPass * createGCInfoPrinter(raw_ostream &OS)
Creates a pass to print GC metadata.
Definition: GCMetadata.cpp:89
char & RemoveRedundantDebugValuesID
RemoveRedundantDebugValues pass.
char & DetectDeadLanesID
This pass adds dead/undef flags after analyzing subregister lanes.
char & StackColoringID
StackSlotColoring - This pass performs stack coloring and merging.
char & PostRAMachineSinkingID
This pass perform post-ra machine sink for COPY instructions.
FunctionPass * createRegAllocScoringPass()
When learning an eviction policy, extract score(reward) information, otherwise this does nothing.
ModulePass * createMachineOutlinerPass(bool RunOnAllFunctions=true)
This pass performs outlining on machine instructions directly before printing assembly.
char & StackSlotColoringID
StackSlotColoring - This pass performs stack slot coloring.
char & EarlyIfPredicatorID
EarlyIfPredicator - This pass performs if-conversion on SSA form by predicating if/else block and ins...
FunctionPass * createX86PreAMXConfigPass()
The pass insert tile config intrinsics for AMX fast register allocation.
FunctionPass * createCFGuardLongjmpPass()
Creates CFGuard longjmp target identification pass.
char & EarlyIfConverterID
EarlyIfConverter - This pass performs if-conversion on SSA form by inserting cmov instructions.
FunctionPass * createDefaultPBQPRegisterAllocator()
PBQPRegisterAllocation Pass - This pass implements the Partitioned Boolean Quadratic Prograaming (PBQ...
FunctionPass * createExpandLargeDivRemPass()
FunctionPass * createInterleavedAccessPass()
InterleavedAccess Pass - This pass identifies and matches interleaved memory accesses to target speci...
FunctionPass * createBasicRegisterAllocator()
BasicRegisterAllocation Pass - This pass implements a degenerate global register allocator using the ...
char & MachineTraceMetricsID
MachineTraceMetrics - This pass computes critical path and CPU resource usage in an ensemble of trace...
char & ProcessImplicitDefsID
ProcessImpicitDefs pass - This pass removes IMPLICIT_DEFs.
ModulePass * createCheckDebugMachineModulePass()
Creates MIR Check Debug pass.
FunctionPass * createBreakFalseDeps()
Creates Break False Dependencies pass.
char & MachinePipelinerID
This pass performs software pipelining on machine instructions.
FunctionPass * createMIRProfileLoaderPass(std::string File, std::string RemappingFile, sampleprof::FSDiscriminatorPass P, IntrusiveRefCntPtr< vfs::FileSystem > FS)
Read Flow Sensitive Profile.
FunctionPass * createCFIFixup()
Creates CFI Fixup pass.
char & MachineCSEID
MachineCSE - This pass performs global CSE on machine instructions.
Definition: MachineCSE.cpp:162
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...
FunctionPass * createUnpackMachineBundles(std::function< bool(const MachineFunction &)> Ftor)
char & LiveVariablesID
LiveVariables pass - This pass computes the set of blocks in which each variable is life and sets mac...
FunctionPass * createExpandReductionsPass()
This pass expands the experimental reduction intrinsics into sequences of shuffles.
MachineFunctionPass * createMachineFunctionSplitterPass()
createMachineFunctionSplitterPass - This pass splits machine functions using profile information.
MachineFunctionPass * createResetMachineFunctionPass(bool EmitFallbackDiag, bool AbortOnFailedISel)
This pass resets a MachineFunction when it has the FailedISel property as if it was just created.
char & VirtRegRewriterID
VirtRegRewriter pass.
Definition: VirtRegMap.cpp:227
FunctionPass * createReplaceWithVeclibLegacyPass()
FunctionPass * createVirtRegRewriter(bool ClearVirtRegs=true)
Definition: VirtRegMap.cpp:646
char & FinalizeISelID
This pass expands pseudo-instructions, reserves registers and adjusts machine frame information.
FunctionPass * createX86LowerAMXTypePass()
The pass transforms load/store <256 x i32> to AMX load/store intrinsics or split the data to two <128...
FunctionPass * createCodeGenPreparePass()
createCodeGenPreparePass - Transform the code to expose more pattern matching during instruction sele...
FunctionPass * createCFIInstrInserter()
Creates CFI Instruction Inserter pass.
FunctionPass * createRegUsageInfoPropPass()
Return a MachineFunction pass that identifies call sites and propagates register usage information of...
char & IfConverterID
IfConverter - This pass performs machine code if conversion.
FunctionPass * createShadowStackGCLoweringPass()
ShadowStackGCLowering - Implements the custom lowering mechanism used by the shadow stack GC.
char & UnreachableMachineBlockElimID
UnreachableMachineBlockElimination - This pass removes unreachable machine basic blocks.
FunctionPass * createHardwareLoopsPass()
Create Hardware Loop pass.
char & MachineBlockPlacementID
MachineBlockPlacement - This pass places basic blocks based on branch probabilities.
char & TwoAddressInstructionPassID
TwoAddressInstruction - This pass reduces two-address instructions to use two operands.
char & LocalStackSlotAllocationID
LocalStackSlotAllocation - This pass assigns local frame indices to stack slots relative to one anoth...
FunctionPass * createEHContGuardCatchretPass()
Creates EHContGuard catchret target identification pass.
char & BranchFolderPassID
BranchFolding - This pass performs machine code CFG based optimizations to delete branches to branche...
MachineFunctionPass * createMachineCopyPropagationPass(bool UseCopyInstr)
char & PHIEliminationID
PHIElimination - This pass eliminates machine instruction PHI nodes by inserting copy instructions.
ModulePass * createDebugifyMachineModulePass()
Creates MIR Debugify pass.
char & MachineFunctionPrinterPassID
MachineFunctionPrinterPass - This pass prints out MachineInstr's.
FunctionPass * createFreeMachineFunctionPass()
This pass frees the memory occupied by the MachineFunction.
char & RenameIndependentSubregsID
This pass detects subregister lanes in a virtual register that are used independently of other lanes ...
char & MachineLICMID
This pass performs loop invariant code motion on machine instructions.
char & MachineBlockPlacementStatsID
MachineBlockPlacementStats - This pass collects statistics about the basic block placement using bran...
FunctionPass * createInterleavedLoadCombinePass()
InterleavedLoadCombines Pass - This pass identifies interleaved loads and combines them into wide loa...
char & RABasicID
Basic register allocator.
std::function< bool(const TargetRegisterInfo &TRI, const TargetRegisterClass &RC)> RegClassFilterFunc
char & LiveIntervalsID
LiveIntervals - This analysis keeps track of the live ranges of virtual and physical registers.
char & MachineCopyPropagationID
MachineCopyPropagation - This pass performs copy propagation on machine instructions.
char & AtomicExpandID
AtomicExpandID – Lowers atomic operations in terms of either cmpxchg load-linked/store-conditional lo...
char & DeadMachineInstructionElimID
DeadMachineInstructionElim - This pass removes dead machine instructions.
char & UnpackMachineBundlesID
UnpackMachineBundles - This pass unpack machine instruction bundles.
ModulePass * createJumpInstrTablesPass()
createJumpInstrTables - This pass creates jump-instruction tables.
FunctionPass * createMachineVerifierPass(const std::string &Banner)
createMachineVerifierPass - This pass verifies cenerated machine code instructions for correctness.
FunctionPass * createWinEHPass(bool DemoteCatchSwitchPHIOnly=false)
createWinEHPass - Prepares personality functions used by MSVC on Windows, in addition to the Itanium ...
char & MIRAddFSDiscriminatorsID
This pass adds flow sensitive discriminators.