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