llvm::OptionalPassInfoMixin

A CRTP mix-in for passes that can be skipped.

Synopsis

Declared in <llvm/IR/PassManager.h>

template<typename DerivedT>
struct OptionalPassInfoMixin
    : /* implementation-defined */

Base Classes

NameDescription
/* implementation-defined */A CRTP mix-in to automatically provide informational APIs needed for passes.

Member Functions

NameDescription
printPipeline Print this pass as a single name in a textual pipeline.

Static Member Functions

NameDescription
isRequired Return false; optional passes may be skipped.

Derived Classes

NameDescription
AAEvaluator A pass that evaluates alias analysis accuracy via N^2 pointer queries.
ADCEPass A DCE pass that assumes instructions are dead until proven otherwise.
AggressiveInstCombinePass A pass that combines expression patterns into fewer, simpler instructions.
AlignmentFromAssumptionsPass A pass that sets load/store/mem-intrinsic alignments from assume bundles.
Annotation2MetadataPass Pass to convert llvm.global.annotations to !annotation metadata.
ArgumentPromotionPass Argument promotion pass.
AssignmentTrackingPass Convert dbg.declare intrinsics into sets of dbg.assign intrinsics.
AssumeBuilderPass This pass will try to build an llvm.assume for every instruction in the function. Its main purpose is testing.
AssumeSimplifyPass This pass attempts to minimize the number of assume without loosing any information.
AttributorCGSCCPass CGSCC pass that runs the Attributor.
AttributorLightCGSCCPass Lightweight Attributor CGSCC pass that only runs attribute inference.
AttributorLightPass Lightweight Attributor module pass that only runs attribute inference.
AttributorPass Module pass that runs the full Attributor.
BDCEPass Bit-Tracking Dead Code Elimination pass.
BlockExtractorPass Pass that extracts specified basic blocks into their own functions.
BranchFolderPass New PM pass that optimizes the machine CFG by folding branches.
BreakCriticalEdgesPass Pass that breaks critical edges in the CFG by inserting dummy basic blocks.
BreakFalseDepsPass New PM pass that breaks false register dependencies which cause stalls.
CFGuardPass New Pass Manager pass that inserts Control Flow Guard checks.
CGProfilePass Pass that builds call-graph profile counts and attaches them as module metadata.
CallSiteSplittingPass Pass that splits call sites to expose constrained arguments.
CalledValuePropagationPass Pass that attaches !callees metadata to indirect call sites.
CanonicalizeAliasesPass Simple pass that canonicalizes aliases.
CanonicalizeFreezeInLoopsPass A pass that canonicalizes freeze instructions in a loop.
CodeGenPreparePass New PM pass that prepares IR for instruction selection.
ComplexDeinterleavingPass New PM pass that generates target intrinsics for complex arithmetic.
ConstantHoistingPass Pass that hoists and coalesces expensive constants for codegen.
ConstantMergePass A pass that merges duplicate global constants into a single constant.
ConstraintEliminationPass Pass that eliminates conditions using constraints from dominating conditions.
ControlHeightReductionPass Pass that merges conditional blocks to reduce branches on hot paths.
CoroAnnotationElidePass Pass that elides heap allocation for coroutine calls marked coro_elide_safe.
CorrelatedValuePropagationPass Pass that propagates values correlated with control-flow conditions.
CountVisitsPass Pass that counts how many times each function is visited.
CrossDSOCFIPass Pass that exports this module's CFI checks for cross-DSO verification.
DCEPass Basic Dead Code Elimination pass.
DFAJumpThreadingPass Pass that jump-threads a predictable switch used as a DFA inside a loop.
DSEPass This class implements a trivial dead store elimination. We consider only the redundant stores that are local to a single Basic Block.
DXILUpgradePass Upgrade DXIL-style metadata into their LLVM representations
DeadArgumentEliminationPass Eliminate dead arguments (and return values) from functions.
DeadMachineInstructionElimPass New PM pass that removes dead machine instructions.
DeclareRuntimeLibcallsPass Pass that inserts declarations for all runtime library calls known for the target.
DevirtSCCRepeatedPass A helper that repeats an SCC pass each time an indirect call is refined to a direct call by that pass.
DivRemPairsPass Hoist/decompose integer division and remainder instructions to enable CFG improvements and better codegen.
DropUnnecessaryAssumesPass Pass that drops assume intrinsics that are unlikely to be useful.
EarlyCSEPass A simple and fast domtree-based CSE pass.
EarlyIfConverterPass New PM pass that performs early if-conversion on SSA form.
EliminateAvailableExternallyPass A pass that transforms external global definitions into declarations.
ExpandMemCmpPass Pass that expands memcmp calls into loads and stores.
ExtractGVPass Pass that extracts or deletes specified global values from a module.
FixupStatepointCallerSavedPass New PM pass that spills caller-saved registers used by statepoints.
FlattenCFGPass Pass that flattens a function's CFG.
Float2IntPass Pass that demotes lossless floating-point operations to integers.
ForceFunctionAttrsPass Pass which forces specific function attributes into the IR, primarily as a debugging tool.
FunctionImportPass The function importing pass
GCEmptyBasicBlocksPass New PM pass that garbage-collects empty machine basic blocks.
GCOVProfilerPass The gcov-style instrumentation pass
GVNHoistPass A simple and fast domtree-based GVN pass to hoist common expressions from sibling branches.
GVNPass The core GVN pass object.
GVNSinkPass Uses an "inverted" value numbering to decide the similarity of expressions and sinks similar expressions into successors.
GlobalDCEPass Pass to remove unused function declarations.
GlobalMergeFuncPass Global function merging pass for new pass manager.
GlobalMergePass New PM pass that merges globals to reduce address-materialization cost.
GlobalOptPass Optimize globals that never have their address taken.
GlobalSplitPass Pass to perform split of global variables.
GuardWideningPass Pass that widens llvm.experimental.guard intrinsics by combining them.
HardwareLoopsPass New PM pass that inserts hardware-loop intrinsics into profitable loops.
HelloWorldPass Example pass that prints each function's name.
HotColdSplittingPass Pass to outline cold regions.
IPSCCPPass Pass to perform interprocedural constant propagation.
IRCEPass Pass that eliminates inductive range checks from loops.
IRNormalizerPass IRNormalizer aims to transform LLVM IR into normal form.
ImplicitNullChecksPass New PM pass that folds null pointer checks into nearby memory operations.
IndVarSimplifyPass Pass that simplifies induction variables in a loop.
InferAddressSpacesPass Pass that infers specific address spaces for generic pointers.
InferAlignmentPass Pass that infers stronger alignments for memory operations.
InferFunctionAttrsPass A pass which infers function attributes from the names and signatures of function declarations in a module.
InjectTLIMappings Pass that injects VFABI mappings from TargetLibraryInfo.
InlinerPass The inliner pass for the new pass manager.
InstCombinePass A pass that combines instructions to form fewer, simpler instructions.
InstSimplifyPass Run instruction simplification across each instruction in the function.
InstrProfilingLoweringPass Instrumentation based profiling lowering pass. This pass lowers the profile instrumented code generated by FE or the IR based instrumentation pass.
InstructionNamerPass Pass that assigns names to anonymous arguments, blocks, and instructions.
InterleavedAccessPass New PM pass that matches interleaved memory accesses to target intrinsics.
InterleavedLoadCombinePass New PM pass that combines interleaved loads into wide loads.
InternalizePass A pass that internalizes all functions and variables other than those that must be preserved according to MustPreserveGV.
InvalidateAllAnalysesPass A utility pass that does nothing, but preserves no analyses.
JumpTableToSwitchPass Pass that replaces jump tables of small functions with switches.
JumpThreadingPass Pass that performs jump threading across multi-predecessor blocks.
LCSSAPass Converts loops into loop-closed SSA form.
LICMPass Performs Loop Invariant Code Motion Pass.
LNICMPass Performs LoopNest Invariant Code Motion Pass.
LibCallsShrinkWrapPass Pass that shrink-wraps unused library calls that may set errno.
LoadStoreVectorizerPass Merges consecutive loads and stores into vector loads and stores.
LogicalSROAPass Logical Scalar Replacement of Aggregates pass.
LoopBoundSplitPass This pass transforms loops that contain a conditional branch with induction variable. For example, it transforms left code to right code:
LoopDataPrefetchPass An optimization pass inserting data prefetches in loops.
LoopDeletionPass Pass that deletes loops that are provably dead.
LoopDistributePass Pass that distributes loops to enable vectorization.
LoopFlattenPass Pass that flattens nested loops into a single loop.
LoopFullUnrollPass Loop unroll pass that only does full loop unrolling and peeling.
LoopFusePass Pass that fuses adjacent loops to improve locality and reduce overhead.
LoopIdiomRecognizePass Performs Loop Idiom Recognize Pass.
LoopIdiomVectorizePass Pass that recognizes specific loop idioms and rewrites them with vector code.
LoopInstSimplifyPass Performs Loop Inst Simplify Pass.
LoopInterchangePass Pass that interchanges nested loops to improve locality and performance.
LoopLoadEliminationPass Pass to forward loads in a loop around the backedge to subsequent iterations.
LoopPredicationPass Performs Loop Predication Pass.
LoopRotatePass A simple loop rotation transformation.
LoopSimplifyCFGPass Performs basic CFG simplifications to assist other loop passes.
LoopSimplifyPass This pass is responsible for loop canonicalization.
LoopSinkPass A pass that does profile-guided sinking of instructions into loops.
LoopStrengthReducePass Performs Loop Strength Reduce Pass.
LoopTermFoldPass Pass that folds loop terminating conditions to eliminate induction-variable uses.
LoopUnrollAndJamPass A simple loop rotation transformation.
LoopUnrollPass Loop unroll pass that supports both full and partial unrolling.
LoopVectorizePass The LoopVectorize Pass.
LoopVersioningLICMPass Pass that versions loops to enable LICM when alias analysis is uncertain.
LoopVersioningPass Expose LoopVersioning as a pass.
LowerConstantIntrinsicsPass Pass that lowers remaining objectsize and is.constant intrinsics.
LowerExpectIntrinsicPass A pass that lowers llvm.expect intrinsics into branch weight metadata.
LowerGlobalDtorsPass Pass that lowers llvm.global_dtors via wrappers registered in llvm.global_ctors.
LowerGuardIntrinsicPass Pass that lowers llvm.experimental.guard to a conditional deoptimize call.
LowerIFuncPass Pass to replace calls to ifuncs with indirect calls.
LowerWidenableConditionPass Pass that lowers llvm.widenable.condition to the default value i1 true.
MachineBlockPlacementPass New PM pass that places basic blocks based on branch probabilities.
MachineCSEPass New PM pass that performs global CSE on machine instructions.
MachineCopyPropagationPass New PM pass that performs copy propagation on machine instructions.
MachineLICMBasePass CRTP base for new-PM machine loop-invariant code motion passes.
MachineLateInstrsCleanupPass New PM pass that removes redundant identical instructions after register allocation and rematerialization.
MachineSchedulerPass New PM pass that runs the pre-RA machine instruction scheduler.
MachineSinkingPass New PM pass that sinks machine instructions into successor blocks.
MakeGuardsExplicitPass Pass that lowers llvm.experimental.guard to widenable explicit branches.
MemCpyOptPass Pass that eliminates memcpy calls and turns store sets into memsets.
MemProfContextDisambiguation Disambiguates memprof allocation contexts for profile-guided heap optimization.
MemProfRemoveInfo Strips MemProf attributes and metadata.
MemProfUsePass Public interface to the MemProf profile-use pass that applies memory profiles to the IR.
MergeFunctionsPass Merge identical functions.
MergeICmpsPass Pass that merges chains of integer comparisons into a memcmp call.
MergedLoadStoreMotionPass Pass that merges loads and stores across diamond (hammock) control flow.
MetaRenamerPass Pass that renames everything with metasyntactic names.
ModuleInlinerPass The module inliner pass for the new pass manager.
ModuleInlinerWrapperPass Module pass wrapping the inliner with a module-wide advisor.
MoveAutoInitPass Pass that moves auto-init instructions closer to their uses when profitable.
NaryReassociatePass Pass that reassociates n-ary expressions to reuse existing instructions.
NewGVNPass A Global Value Numbering pass that eliminates redundant values.
NoOpCGSCCPass No-op CGSCC pass which does nothing.
NoOpFunctionPass No-op function pass which does nothing.
NoOpLoopNestPass No-op loop nest pass which does nothing.
NoOpLoopPass No-op loop pass which does nothing.
NoOpMachineFunctionPass No-op machine function pass which does nothing.
NoOpModulePass No-op module pass which does nothing.
NoRecurseLTOInferencePass Additional 'norecurse' attribute deduction during postlink LTO phase.
NoinlineNonPrevailing Utility pass that blocks inlining for functions that may be overridden by a prevailing copy during linking.
ObjCARCContractPass Contract low-level ObjC ARC operations into higher-level forms late in the pipeline.
ObjCARCExpandPass Expand ObjC ARC operations early for later ARC optimizations.
ObjCARCOptPass Optimize ObjC Automatic Reference Counting retain/release operations.
OpenMPOptCGSCCPass OpenMP optimizations pass operating on a call-graph SCC.
OpenMPOptPass OpenMP optimizations pass.
OptimizePHIsPass New PM pass that optimizes machine instruction PHIs.
PAEvalPass Evaluate ObjC ARC provenance analysis results for debugging.
PGOCtxProfFlatteningPass Pass that flattens contextual profiles into MD_prof metadata.
PGOCtxProfLoweringPass Pass that lowers contextual PGO instrumentation into runtime calls.
PGOForceFunctionAttrsPass Pass that applies size or optnone attributes to cold functions based on PGO.
PGOIndirectCallPromotion The indirect function call promotion pass.
PGOInstrumentationGen The instrumentation (profile-instr-gen) pass for IR based PGO.
PGOInstrumentationGenCreateVar The instrumentation (profile-instr-gen) pass for IR based PGO.
PGOInstrumentationUse The profile annotation (profile-instr-use) pass for IR based PGO.
PGOMemOPSizeOpt The profile size based optimization pass for memory intrinsics.
PartialInlinerPass Pass to remove unused function declarations.
PartiallyInlineLibCallsPass Pass that partially inlines the fast path of well-known library functions.
PeepholeOptimizerPass New PM pass that peep-hole optimizes machine instructions.
PlaceSafepointsPass Pass that inserts GC safepoints into IR at call sites, entries, and loops.
PostMachineSchedulerPass New PM pass that runs the post-RA machine instruction scheduler.
PostOrderFunctionAttrsPass Computes function attributes in post-order over the call graph.
PostRAMachineSinkingPass New PM pass that sinks copy instructions after register allocation.
PostRASchedulerPass New PM pass that performs post-register-allocation instruction scheduling.
ProfileInjectorPass Inject MD_prof metadata where it's missing. Used for testing that passes don't accidentally drop this metadata.
ProfileVerifierPass Pass that verifies MD_prof is present on every instruction that supports it.
PromotePass Pass that promotes memory allocas to SSA registers via PromoteMemToReg.
PseudoProbeUpdatePass Pseudo probe distribution factor updater.
ReassociatePass Reassociate commutative expressions.
RecomputeGlobalsAAPass Pass that clears and recomputes a cached GlobalsAA result.
RedundantDbgInstEliminationPass Pass that removes redundant debug instructions from a function.
RegToMemPass Pass that demotes registers to memory allocas.
RelLookupTableConverterPass Pass that converts lookup tables to relative lookup tables.
RemoveLoadsIntoFakeUsesPass New PM pass that removes loads that are only used by FAKE_USE instructions.
RequireAnalysisPass<AnalysisT, Loop, LoopAnalysisManager, LoopStandardAnalysisResults&, LPMUpdater&> A require-analysis pass specialization for loop transformations.
ReversePostOrderFunctionAttrsPass A pass to do RPO deduction and propagation of function attributes.
RewriteStatepointsForGC Pass that rewrites calls and invokes to make GC relocations explicit in IR.
RewriteSymbolPass Pass that rewrites module-level symbol names per configured descriptors.
SCCPPass This pass performs function-level constant propagation and merging.
SLPVectorizerPass Function pass that vectorizes straight-line code via bottom-up SLP.
SROAPass Scalar Replacement of Aggregates pass.
SampleProfileLoaderPass The sample profiler data loader pass.
SampleProfileProbePass Pass that inserts sample-profile pseudo probes into a module.
SandboxVectorizerPass Vectorizes IR using a configurable SandboxIR function-pass pipeline.
ScalarizerPass Pass that converts vector operations into scalar or smaller-vector forms.
SelectOptimizePass New PM pass that converts select instructions to branches when profitable.
SeparateConstOffsetFromGEPPass Pass that splits GEPs into a variadic base and a constant offset.
ShrinkWrapPass New PM pass that finds better places for prologue/epilogue save and restore.
SimpleLoopUnswitchPass Pass that unswitches loops with loop-invariant branch or switch conditions.
SimplifyCFGPass A pass to simplify and canonicalize the CFG of a function.
SimplifyTypeTestsPass Pass that simplifies type-test intrinsics where possible.
SinkingPass Move instructions into successor blocks when possible.
SpeculativeExecutionPass Pass that hoists instructions to enable speculative execution.
StackSlotColoringPass New PM pass that colors stack slots to share non-overlapping spill slots.
StaticDataAnnoatorPass New PM pass that annotates static data section prefixes from profiles.
StaticDataSplitterPass New PM pass that categorizes static data hotness using profile information.
StraightLineStrengthReducePass Performs straight-line strength reduction on arithmetic expressions.
StripConvergenceIntrinsicsPass Pass that strips convergence intrinsics and operand bundles.
StripDeadCGProfilePass Pass that removes dead edges from the CG Profile module flag.
StripDeadDebugInfoPass Pass that removes debug info for deleted functions and globals.
StripDeadPrototypesPass Pass to remove unused function declarations.
StripDebugDeclarePass Pass that removes llvm.dbg.declare intrinsics from a module.
StripGCRelocates Pass that removes gc.relocates inserted by RewriteStatepointsForGC.
StripNonDebugSymbolsPass Pass that strips non-debug symbol names while preserving debug info.
StripNonLineTableDebugInfoPass Pass that strips debug info down to line-table information only.
StripSymbolsPass Pass that strips symbol names and debug info from a module.
TailCallElimPass A pass that eliminates tail recursion by converting it into a loop.
TailDuplicatePassBase CRTP base for new-PM machine-function tail-duplication passes.
TriggerCrashFunctionPass Pass that aborts when run over a function, for testing crash handling.
TriggerCrashModulePass Pass that aborts when run over a module, for testing crash handling.
TypePromotionPass New PM pass that promotes small integer types that would otherwise be promoted during legalization.
VectorCombinePass Optimize scalar/vector interactions in IR using target cost models.
WarnMissedTransformationsPass Pass that emits warnings when forced transformations were not performed.
WholeProgramDevirtPass Pass that performs whole-program virtual call devirtualization.