139 cl::desc(
"Enable ML policy for inliner. Currently trained for -Oz only"),
141 "Heuristics-based inliner version"),
142 clEnumValN(InliningAdvisorMode::Development,
"development",
143 "Use development mode (runtime-loadable model)"),
144 clEnumValN(InliningAdvisorMode::Release,
"release",
145 "Use release mode (AOT-compiled model)")));
149 cl::desc(
"Run synthetic function entry count generation "
156 cl::desc(
"Enable inline deferral during PGO"));
159 cl::desc(
"Enable memory profiler"));
167 cl::desc(
"Perform mandatory inlinings module-wide, before performing "
172 cl::desc(
"Eagerly invalidate more analyses in default pipelines"));
176 cl::desc(
"Enable function merging as part of the optimization pipeline"));
180 cl::desc(
"Run the loop rotation transformation after PGO instrumentation"));
184 cl::desc(
"Enable inter-procedural analyses"));
188 cl::desc(
"Run Partial inlinining pass"));
192 cl::desc(
"Run cleanup optimization passes after vectorization"));
199 cl::desc(
"Enable the experimental LoopInterchange Pass"));
203 cl::desc(
"Enable Unroll And Jam Pass"));
207 cl::desc(
"Enable the LoopFlatten Pass"));
211 cl::desc(
"Enable DFA jump threading"),
216 cl::desc(
"Enable hot-cold splitting pass"));
220 cl::desc(
"Enable ir outliner pass"));
224 cl::desc(
"Disable pre-instrumentation inliner"));
228 cl::desc(
"Control the amount of inlining in pre-instrumentation inliner "
233 cl::desc(
"Enable the GVN hoisting pass (default = off)"));
237 cl::desc(
"Enable the GVN sinking pass (default = off)"));
243 cl::desc(
"Enable control height reduction optimization (CHR)"));
247 cl::desc(
"Indicate the sample profile being used is flattened, i.e., "
248 "no inline hierachy exists in the profile"));
252 cl::desc(
"Enable order file instrumentation (default = off)"));
256 cl::desc(
"Enable lowering of the matrix intrinsics"));
261 "Enable pass to eliminate conditions based on linear constraints"));
265 cl::desc(
"Enable the attributor inter-procedural deduction pass"),
267 "enable all attributor runs"),
268 clEnumValN(AttributorRunOption::MODULE,
"module",
269 "enable module-wide attributor runs"),
270 clEnumValN(AttributorRunOption::CGSCC,
"cgscc",
271 "enable call graph SCC attributor runs"),
273 "disable attributor runs")));
300 for (
auto &
C : PeepholeEPCallbacks)
339 invokePeepholeEPCallbacks(FPM, Level);
387 for (
auto &
C : LateLoopOptimizationsEPCallbacks)
406 for (
auto &
C : LoopOptimizerEndEPCallbacks)
444 invokePeepholeEPCallbacks(FPM, Level);
448 for (
auto &
C : ScalarOptimizerLateEPCallbacks)
458 invokePeepholeEPCallbacks(FPM, Level);
470 if (Level.getSpeedupLevel() == 1)
471 return buildO1FunctionSimplificationPipeline(Level,
Phase);
514 if (!Level.isOptimizingForSize())
517 invokePeepholeEPCallbacks(FPM, Level);
522 !Level.isOptimizingForSize())
574 for (
auto &
C : LateLoopOptimizationsEPCallbacks)
593 for (
auto &
C : LoopOptimizerEndEPCallbacks)
640 invokePeepholeEPCallbacks(FPM, Level);
666 for (
auto &
C : ScalarOptimizerLateEPCallbacks)
670 .convertSwitchRangeToICmp(
true)
671 .hoistCommonInsts(
true)
672 .sinkCommonInsts(
true)));
674 invokePeepholeEPCallbacks(FPM, Level);
686 bool IsCS, std::string ProfileFile,
687 std::string ProfileRemappingFile,
712 invokePeepholeEPCallbacks(FPM, Level);
725 if (!RunProfileGen) {
726 assert(!ProfileFile.empty() &&
"Profile use expecting a profile file!");
750 if (!ProfileFile.empty())
751 Options.InstrProfileOutput = ProfileFile;
753 Options.DoCounterPromotion =
true;
754 Options.UseBFIInPromotion = IsCS;
760 std::string ProfileFile, std::string ProfileRemappingFile,
762 if (!RunProfileGen) {
763 assert(!ProfileFile.empty() &&
"Profile use expecting a profile file!");
776 if (!ProfileFile.empty())
777 Options.InstrProfileOutput = ProfileFile;
779 Options.DoCounterPromotion =
false;
780 Options.UseBFIInPromotion = IsCS;
855 for (
auto &
C : CGSCCOptimizerLateEPCallbacks)
856 C(MainCGPipeline, Level);
929 if (PGOOpt && PGOOpt->PseudoProbeForProfiling &&
938 bool LoadSampleProfile =
979 if (LoadSampleProfile) {
983 PGOOpt->ProfileRemappingFile,
Phase));
1013 for (
auto &
C : PipelineEarlySimplificationEPCallbacks)
1040 invokePeepholeEPCallbacks(GlobalCleanupPM, Level);
1050 addPGOInstrPasses(
MPM, Level,
1052 false, PGOOpt->ProfileFile,
1053 PGOOpt->ProfileRemappingFile,
Phase, PGOOpt->FS);
1154 FPM.
addPass(std::move(ExtraPasses));
1167 .forwardSwitchCondToPhi(
true)
1168 .convertSwitchRangeToICmp(
true)
1169 .convertSwitchToLookupTable(
true)
1170 .needCanonicalLoops(
false)
1171 .hoistCommonInsts(
true)
1172 .sinkCommonInsts(
true)));
1267 if (!LTOPreLink && PGOOpt) {
1269 addPGOInstrPasses(
MPM, Level,
true,
1270 true, PGOOpt->CSProfileGenFile,
1271 PGOOpt->ProfileRemappingFile, LTOPhase, PGOOpt->FS);
1273 addPGOInstrPasses(
MPM, Level,
false,
1274 true, PGOOpt->ProfileFile,
1275 PGOOpt->ProfileRemappingFile, LTOPhase, PGOOpt->FS);
1287 for (
auto &
C : OptimizerEarlyEPCallbacks)
1311 for (
auto &
C : VectorizerStartEPCallbacks)
1312 C(OptimizePM, Level);
1324 std::move(LPM),
false,
false));
1336 addVectorPasses(Level, OptimizePM,
false);
1364 for (
auto &
C : OptimizerLastEPCallbacks)
1418 for (
auto &
C : PipelineStartEPCallbacks)
1421 if (PGOOpt && PGOOpt->DebugInfoForProfiling)
1433 if (PGOOpt && PGOOpt->PseudoProbeForProfiling &&
1441 addRequiredLTOPreLinkPasses(
MPM);
1459 if (PGOOpt && PGOOpt->DebugInfoForProfiling)
1463 for (
auto &
C : PipelineStartEPCallbacks)
1482 if (PGOOpt && PGOOpt->PseudoProbeForProfiling &&
1489 for (
auto &
C : OptimizerEarlyEPCallbacks)
1491 for (
auto &
C : OptimizerLastEPCallbacks)
1497 addRequiredLTOPreLinkPasses(
MPM);
1509 if (ImportSummary) {
1573 for (
auto &
C : FullLinkTimeOptimizationEarlyEPCallbacks)
1589 for (
auto &
C : FullLinkTimeOptimizationLastEPCallbacks)
1601 PGOOpt->ProfileRemappingFile,
1622 if (Level.getSpeedupLevel() > 1) {
1671 for (
auto &
C : FullLinkTimeOptimizationLastEPCallbacks)
1701 invokePeepholeEPCallbacks(PeepholeFPM, Level);
1739 invokePeepholeEPCallbacks(FPM, Level);
1750 addPGOInstrPasses(
MPM, Level,
true,
1751 true, PGOOpt->CSProfileGenFile,
1752 PGOOpt->ProfileRemappingFile,
1755 addPGOInstrPasses(
MPM, Level,
false,
1756 true, PGOOpt->ProfileFile,
1757 PGOOpt->ProfileRemappingFile,
1815 std::move(LPM),
false,
true));
1819 addVectorPasses(Level, MainFPM,
true);
1825 invokePeepholeEPCallbacks(MainFPM, Level);
1861 for (
auto &
C : FullLinkTimeOptimizationLastEPCallbacks)
1873 "buildO0DefaultPipeline should only be used with O0");
1881 if (PGOOpt && PGOOpt->PseudoProbeForProfiling)
1889 false, PGOOpt->ProfileFile, PGOOpt->ProfileRemappingFile,
1892 for (
auto &
C : PipelineStartEPCallbacks)
1895 if (PGOOpt && PGOOpt->DebugInfoForProfiling)
1898 for (
auto &
C : PipelineEarlySimplificationEPCallbacks)
1915 if (!CGSCCOptimizerLateEPCallbacks.empty()) {
1917 for (
auto &
C : CGSCCOptimizerLateEPCallbacks)
1922 if (!LateLoopOptimizationsEPCallbacks.empty()) {
1924 for (
auto &
C : LateLoopOptimizationsEPCallbacks)
1931 if (!LoopOptimizerEndEPCallbacks.empty()) {
1933 for (
auto &
C : LoopOptimizerEndEPCallbacks)
1940 if (!ScalarOptimizerLateEPCallbacks.empty()) {
1942 for (
auto &
C : ScalarOptimizerLateEPCallbacks)
1948 for (
auto &
C : OptimizerEarlyEPCallbacks)
1951 if (!VectorizerStartEPCallbacks.empty()) {
1953 for (
auto &
C : VectorizerStartEPCallbacks)
1968 for (
auto &
C : OptimizerLastEPCallbacks)
1972 addRequiredLTOPreLinkPasses(
MPM);
aarch64 falkor hwpf fix Falkor HW Prefetch Fix Late Phase
AggressiveInstCombiner - Combine expression patterns to form expressions with fewer,...
Provides passes to inlining "always_inline" functions.
This is the interface for LLVM's primary stateless and local alias analysis.
This file provides the interface for LLVM's Call Graph Profile pass.
This header provides classes for managing passes over SCCs of the call graph.
#define clEnumValN(ENUMVAL, FLAGNAME, DESC)
This file provides the interface for a simple, fast CSE pass.
Super simple passes to force specific function attrs from the commandline into the IR for debugging p...
Provides passes for computing function attributes based on interprocedural analyses.
This file provides the interface for LLVM's Global Value Numbering pass which eliminates fully redund...
This is the interface for a simple mod/ref and alias analysis over globals.
Interfaces for passes which infer implicit function attributes from the name and signature of functio...
This file provides the primary interface to the instcombine pass.
Defines passes for running instruction simplification across chunks of IR.
This file provides the interface for LLVM's PGO Instrumentation lowering pass.
See the comments on JumpThreadingPass.
cl::opt< bool > EnableMemProfContextDisambiguation
Enable MemProf context disambiguation for thin link.
This header defines the LoopLoadEliminationPass object.
This header provides classes for managing a pipeline of passes over loops in LLVM IR.
The header file for the LowerConstantIntrinsics pass as used by the new pass manager.
The header file for the LowerExpectIntrinsic pass as used by the new pass manager.
This pass performs merges of loads and stores on both sides of a.
This file provides the interface for LLVM's Global Value Numbering pass.
This header enumerates the LLVM-provided high-level optimization levels.
This file provides the interface for IR based instrumentation passes ( (profile-gen,...
Define option tunables for PGO.
static cl::opt< bool > EnableMergeFunctions("enable-merge-functions", cl::init(false), cl::Hidden, cl::desc("Enable function merging as part of the optimization pipeline"))
static cl::opt< bool > EnableGlobalAnalyses("enable-global-analyses", cl::init(true), cl::Hidden, cl::desc("Enable inter-procedural analyses"))
static cl::opt< bool > EnableMemProfiler("enable-mem-prof", cl::Hidden, cl::desc("Enable memory profiler"))
static cl::opt< bool > EnableIROutliner("ir-outliner", cl::init(false), cl::Hidden, cl::desc("Enable ir outliner pass"))
static cl::opt< bool > RunNewGVN("enable-newgvn", cl::init(false), cl::Hidden, cl::desc("Run the NewGVN pass"))
static cl::opt< bool > DisablePreInliner("disable-preinline", cl::init(false), cl::Hidden, cl::desc("Disable pre-instrumentation inliner"))
static cl::opt< bool > EnableEagerlyInvalidateAnalyses("eagerly-invalidate-analyses", cl::init(true), cl::Hidden, cl::desc("Eagerly invalidate more analyses in default pipelines"))
static cl::opt< bool > ExtraVectorizerPasses("extra-vectorizer-passes", cl::init(false), cl::Hidden, cl::desc("Run cleanup optimization passes after vectorization"))
cl::opt< bool > EnableMemProfContextDisambiguation("enable-memprof-context-disambiguation", cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::desc("Enable MemProf context disambiguation"))
static void addAnnotationRemarksPass(ModulePassManager &MPM)
static cl::opt< bool > EnablePostPGOLoopRotation("enable-post-pgo-loop-rotation", cl::init(true), cl::Hidden, cl::desc("Run the loop rotation transformation after PGO instrumentation"))
static InlineParams getInlineParamsFromOptLevel(OptimizationLevel Level)
static cl::opt< bool > EnableGVNSink("enable-gvn-sink", cl::desc("Enable the GVN sinking pass (default = off)"))
static cl::opt< bool > RunPartialInlining("enable-partial-inlining", cl::init(false), cl::Hidden, cl::desc("Run Partial inlinining pass"))
static cl::opt< bool > EnableGVNHoist("enable-gvn-hoist", cl::desc("Enable the GVN hoisting pass (default = off)"))
static cl::opt< bool > EnableDFAJumpThreading("enable-dfa-jump-thread", cl::desc("Enable DFA jump threading"), cl::init(false), cl::Hidden)
static cl::opt< bool > EnableCHR("enable-chr", cl::init(true), cl::Hidden, cl::desc("Enable control height reduction optimization (CHR)"))
static cl::opt< bool > EnableHotColdSplit("hot-cold-split", cl::desc("Enable hot-cold splitting pass"))
static cl::opt< bool > EnableLoopInterchange("enable-loopinterchange", cl::init(false), cl::Hidden, cl::desc("Enable the experimental LoopInterchange Pass"))
static cl::opt< bool > PerformMandatoryInliningsFirst("mandatory-inlining-first", cl::init(true), cl::Hidden, cl::desc("Perform mandatory inlinings module-wide, before performing " "inlining"))
static cl::opt< int > PreInlineThreshold("preinline-threshold", cl::Hidden, cl::init(75), cl::desc("Control the amount of inlining in pre-instrumentation inliner " "(default = 75)"))
static cl::opt< bool > EnableUnrollAndJam("enable-unroll-and-jam", cl::init(false), cl::Hidden, cl::desc("Enable Unroll And Jam Pass"))
static cl::opt< bool > EnableModuleInliner("enable-module-inliner", cl::init(false), cl::Hidden, cl::desc("Enable module inliner"))
static cl::opt< bool > EnableMatrix("enable-matrix", cl::init(false), cl::Hidden, cl::desc("Enable lowering of the matrix intrinsics"))
static cl::opt< AttributorRunOption > AttributorRun("attributor-enable", cl::Hidden, cl::init(AttributorRunOption::NONE), cl::desc("Enable the attributor inter-procedural deduction pass"), cl::values(clEnumValN(AttributorRunOption::ALL, "all", "enable all attributor runs"), clEnumValN(AttributorRunOption::MODULE, "module", "enable module-wide attributor runs"), clEnumValN(AttributorRunOption::CGSCC, "cgscc", "enable call graph SCC attributor runs"), clEnumValN(AttributorRunOption::NONE, "none", "disable attributor runs")))
static cl::opt< bool > EnableOrderFileInstrumentation("enable-order-file-instrumentation", cl::init(false), cl::Hidden, cl::desc("Enable order file instrumentation (default = off)"))
static cl::opt< bool > EnableSyntheticCounts("enable-npm-synthetic-counts", cl::Hidden, cl::desc("Run synthetic function entry count generation " "pass"))
static bool isLTOPreLink(ThinOrFullLTOPhase Phase)
static cl::opt< bool > EnablePGOInlineDeferral("enable-npm-pgo-inline-deferral", cl::init(true), cl::Hidden, cl::desc("Enable inline deferral during PGO"))
Flag to enable inline deferral during PGO.
static cl::opt< InliningAdvisorMode > UseInlineAdvisor("enable-ml-inliner", cl::init(InliningAdvisorMode::Default), cl::Hidden, cl::desc("Enable ML policy for inliner. Currently trained for -Oz only"), cl::values(clEnumValN(InliningAdvisorMode::Default, "default", "Heuristics-based inliner version"), clEnumValN(InliningAdvisorMode::Development, "development", "Use development mode (runtime-loadable model)"), clEnumValN(InliningAdvisorMode::Release, "release", "Use release mode (AOT-compiled model)")))
static cl::opt< bool > FlattenedProfileUsed("flattened-profile-used", cl::init(false), cl::Hidden, cl::desc("Indicate the sample profile being used is flattened, i.e., " "no inline hierachy exists in the profile"))
static cl::opt< bool > EnableConstraintElimination("enable-constraint-elimination", cl::init(true), cl::Hidden, cl::desc("Enable pass to eliminate conditions based on linear constraints"))
static cl::opt< bool > EnableLoopFlatten("enable-loop-flatten", cl::init(false), cl::Hidden, cl::desc("Enable the LoopFlatten Pass"))
This header defines various interfaces for pass management in LLVM.
This file implements relative lookup table converter that converts lookup tables to relative lookup t...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file provides the interface for LLVM's Scalar Replacement of Aggregates pass.
This file provides the interface for the pseudo probe implementation for AutoFDO.
This file provides the interface for the sampled PGO loader pass.
This is the interface for a metadata-based scoped no-alias analysis.
This file provides the interface for the pass responsible for both simplifying and canonicalizing the...
This file defines the 'Statistic' class, which is designed to be an easy way to expose various metric...
This is the interface for a metadata-based TBAA.
Defines the virtual file system interface vfs::FileSystem.
A manager for alias analyses.
void registerFunctionAnalysis()
Register a specific AA result.
void registerModuleAnalysis()
Register a specific AA result.
Inlines functions marked as "always_inline".
Analysis pass providing a never-invalidated alias analysis result.
Simple pass that canonicalizes aliases.
A pass that merges duplicate global constants into a single constant.
This class implements a trivial dead store elimination.
Eliminate dead arguments (and return values) from functions.
A pass that transforms external global definitions into declarations.
The core GVN pass object.
Pass to remove unused function declarations.
Optimize globals that never have their address taken.
Pass to perform split of global variables.
Analysis pass providing a never-invalidated alias analysis result.
Pass to outline cold regions.
Pass to perform interprocedural constant propagation.
Pass to outline similar regions.
Run instruction simplification across each instruction in the function.
The instrumentation pass for recording function order.
Instrumentation based profiling lowering pass.
A smart pointer to a reference-counted object that inherits from RefCountedBase or ThreadSafeRefCount...
This pass performs 'jump threading', which looks at blocks that have multiple predecessors and multip...
Performs Loop Invariant Code Motion Pass.
Loop unroll pass that only does full loop unrolling and peeling.
Performs Loop Idiom Recognize Pass.
Performs Loop Inst Simplify Pass.
A simple loop rotation transformation.
Performs basic CFG simplifications to assist other loop passes.
A pass that does profile-guided sinking of instructions into loops.
A simple loop rotation transformation.
Loop unroll pass that will support both full and partial unrolling.
Public interface to the memory profiler pass for instrumenting code to profile memory accesses.
Merge identical functions.
The module inliner pass for the new pass manager.
Module pass, wrapping the inliner pass.
void addModulePass(T Pass)
Add a module pass that runs before the CGSCC passes.
Public interface to the memory profiler module pass for instrumenting code to profile memory allocati...
Class to hold module path string table and global value map, and encapsulate methods for operating on...
Simple pass that provides a name to every anonymous globals.
OpenMP optimizations pass.
static const OptimizationLevel O3
Optimize for fast execution as much as possible.
static const OptimizationLevel Oz
A very specialized mode that will optimize for code size at any and all costs.
static const OptimizationLevel O0
Disable as many optimizations as possible.
static const OptimizationLevel Os
Similar to O2 but tries to optimize for small code size instead of fast execution without triggering ...
static const OptimizationLevel O2
Optimize for fast execution as much as possible without triggering significant incremental compile ti...
static const OptimizationLevel O1
Optimize quickly without destroying debuggability.
The instrumentation (profile-instr-gen) pass for IR based PGO.
The instrumentation (profile-instr-gen) pass for IR based PGO.
The profile annotation (profile-instr-use) pass for IR based PGO.
The profile size based optimization pass for memory intrinsics.
Pass to remove unused function declarations.
ModulePassManager buildO0DefaultPipeline(OptimizationLevel Level, bool LTOPreLink=false)
Build an O0 pipeline with the minimal semantically required passes.
ModuleInlinerWrapperPass buildInlinerPipeline(OptimizationLevel Level, ThinOrFullLTOPhase Phase)
Construct the module pipeline that performs inlining as well as the inlining-driven cleanups.
AAManager buildDefaultAAPipeline()
Build the default AAManager with the default alias analysis pipeline registered.
ModulePassManager buildThinLTOPreLinkDefaultPipeline(OptimizationLevel Level)
Build a pre-link, ThinLTO-targeting default optimization pipeline to a pass manager.
ModulePassManager buildPerModuleDefaultPipeline(OptimizationLevel Level, bool LTOPreLink=false)
Build a per-module default optimization pipeline.
FunctionPassManager buildFunctionSimplificationPipeline(OptimizationLevel Level, ThinOrFullLTOPhase Phase)
Construct the core LLVM function canonicalization and simplification pipeline.
ModulePassManager buildLTODefaultPipeline(OptimizationLevel Level, ModuleSummaryIndex *ExportSummary)
Build an LTO default optimization pipeline to a pass manager.
ModulePassManager buildModuleInlinerPipeline(OptimizationLevel Level, ThinOrFullLTOPhase Phase)
Construct the module pipeline that performs inlining with module inliner pass.
ModulePassManager buildThinLTODefaultPipeline(OptimizationLevel Level, const ModuleSummaryIndex *ImportSummary)
Build an ThinLTO default optimization pipeline to a pass manager.
void addPGOInstrPassesForO0(ModulePassManager &MPM, bool RunProfileGen, bool IsCS, std::string ProfileFile, std::string ProfileRemappingFile, IntrusiveRefCntPtr< vfs::FileSystem > FS)
Add PGOInstrumenation passes for O0 only.
ModulePassManager buildModuleSimplificationPipeline(OptimizationLevel Level, ThinOrFullLTOPhase Phase)
Construct the core LLVM module canonicalization and simplification pipeline.
ModulePassManager buildModuleOptimizationPipeline(OptimizationLevel Level, ThinOrFullLTOPhase LTOPhase)
Construct the core LLVM module optimization pipeline.
ModulePassManager buildLTOPreLinkDefaultPipeline(OptimizationLevel Level)
Build a pre-link, LTO-targeting default optimization pipeline to a pass manager.
LLVM_ATTRIBUTE_MINSIZE std::enable_if_t< is_detected< HasRunOnLoopT, PassT >::value > addPass(PassT &&Pass)
LLVM_ATTRIBUTE_MINSIZE std::enable_if_t<!std::is_same< PassT, PassManager >::value > addPass(PassT &&Pass)
bool isEmpty() const
Returns if the pass manager contains any passes.
unsigned LicmMssaNoAccForPromotionCap
Tuning option to disable promotion to scalars in LICM with MemorySSA, if the number of access is too ...
bool SLPVectorization
Tuning option to enable/disable slp loop vectorization, set based on opt level.
int InlinerThreshold
Tuning option to override the default inliner threshold.
bool EagerlyInvalidateAnalyses
bool CallGraphProfile
Tuning option to enable/disable call graph profile.
bool MergeFunctions
Tuning option to enable/disable function merging.
bool ForgetAllSCEVInLoopUnroll
Tuning option to forget all SCEV loops in LoopUnroll.
unsigned LicmMssaOptCap
Tuning option to cap the number of calls to retrive clobbering accesses in MemorySSA,...
bool LoopInterleaving
Tuning option to set loop interleaving on/off, set based on opt level.
PipelineTuningOptions()
Constructor sets pipeline tuning defaults based on cl::opts.
bool LoopUnrolling
Tuning option to enable/disable loop unrolling. Its default value is true.
bool LoopVectorization
Tuning option to enable/disable loop vectorization, set based on opt level.
Reassociate commutative expressions.
A pass to do RPO deduction and propagation of function attributes.
This pass performs function-level constant propagation and merging.
An optimization pass providing Scalar Replacement of Aggregates.
The sample profiler data loader pass.
Analysis pass providing a never-invalidated alias analysis result.
This pass transforms loops that contain branches or switches on loop- invariant conditions to have mu...
A pass to simplify and canonicalize the CFG of a function.
virtual void registerDefaultAliasAnalyses(AAManager &)
Allow the target to register alias analyses with the AAManager for use with the new pass manager.
Analysis pass providing a never-invalidated alias analysis result.
Optimize scalar/vector interactions in IR using target cost models.
Interfaces for registering analysis passes, producing common pass manager configurations,...
@ C
The default llvm calling convention, compatible with C.
ValuesClass values(OptsTy... Options)
Helper to build a ValuesClass by forwarding a variable number of arguments as an initializer list to ...
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
ModuleToFunctionPassAdaptor createModuleToFunctionPassAdaptor(FunctionPassT &&Pass, bool EagerlyInvalidate=false)
A function to deduce a function pass type and wrap it in the templated adaptor.
ThinOrFullLTOPhase
This enumerates the LLVM full LTO or ThinLTO optimization phases.
@ FullLTOPreLink
Full LTO prelink phase.
@ ThinLTOPostLink
ThinLTO postlink (backend compile) phase.
@ None
No LTO/ThinLTO behavior needed.
@ FullLTOPostLink
Full LTO postlink (backend compile) phase.
@ ThinLTOPreLink
ThinLTO prelink (summary) phase.
ModuleToPostOrderCGSCCPassAdaptor createModuleToPostOrderCGSCCPassAdaptor(CGSCCPassT &&Pass)
A function to deduce a function pass type and wrap it in the templated adaptor.
CGSCCToFunctionPassAdaptor createCGSCCToFunctionPassAdaptor(FunctionPassT &&Pass, bool EagerlyInvalidate=false, bool NoRerun=false)
A function to deduce a function pass type and wrap it in the templated adaptor.
cl::opt< bool > ForgetSCEVInLoopUnroll
bool AreStatisticsEnabled()
Check if statistics are enabled.
InlineParams getInlineParams()
Generate the parameters to tune the inline cost analysis based only on the commandline options.
cl::opt< bool > EnableKnowledgeRetention
enable preservation of attributes in assume like: call void @llvm.assume(i1 true) [ "nonnull"(i32* PT...
cl::opt< unsigned > SetLicmMssaNoAccForPromotionCap
std::enable_if_t< is_detected< HasRunOnLoopT, LoopPassT >::value, FunctionToLoopPassAdaptor > createFunctionToLoopPassAdaptor(LoopPassT &&Pass, bool UseMemorySSA=false, bool UseBlockFrequencyInfo=false, bool UseBranchProbabilityInfo=false)
A function to deduce a loop pass type and wrap it in the templated adaptor.
cl::opt< unsigned > MaxDevirtIterations("max-devirt-iterations", cl::ReallyHidden, cl::init(4))
cl::opt< unsigned > SetLicmMssaOptCap
A DCE pass that assumes instructions are dead until proven otherwise.
This pass attempts to minimize the number of assume without loosing any information.
Hoist/decompose integer division and remainder instructions to enable CFG improvements and better cod...
A simple and fast domtree-based CSE pass.
Pass which forces specific function attributes into the IR, primarily as a debugging tool.
A simple and fast domtree-based GVN pass to hoist common expressions from sibling branches.
Uses an "inverted" value numbering to decide the similarity of expressions and sinks similar expressi...
A set of parameters to control various transforms performed by IPSCCP pass.
A pass which infers function attributes from the names and signatures of function declarations in a m...
Provides context on when an inline advisor is constructed in the pipeline (e.g., link phase,...
Thresholds to tune inline cost analysis.
std::optional< int > HotCallSiteThreshold
Threshold to use when the callsite is considered hot.
int DefaultThreshold
The default threshold to start with for a callee.
std::optional< bool > EnableDeferral
Indicate whether we should allow inline deferral.
std::optional< int > HintThreshold
Threshold to use for callees with inline hint.
Options for the frontend instrumentation based profiling pass.
A no-op pass template which simply forces a specific analysis result to be invalidated.
Pass to forward loads in a loop around the backedge to subsequent iterations.
A set of parameters used to control various transforms performed by the LoopUnroll pass.
Computes function attributes in post-order over the call graph.
A utility pass template to force an analysis result to be available.