LLVM 20.0.0git
|
This file provides the implementation of the PassBuilder based on our static pass registry as well as related functionality. More...
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/BasicAliasAnalysis.h"
#include "llvm/Analysis/CGSCCPassManager.h"
#include "llvm/Analysis/CtxProfAnalysis.h"
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/InlineAdvisor.h"
#include "llvm/Analysis/ProfileSummaryInfo.h"
#include "llvm/Analysis/ScopedNoAliasAA.h"
#include "llvm/Analysis/TypeBasedAliasAnalysis.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Passes/OptimizationLevel.h"
#include "llvm/Passes/PassBuilder.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/PGOOptions.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h"
#include "llvm/Transforms/Coroutines/CoroCleanup.h"
#include "llvm/Transforms/Coroutines/CoroConditionalWrapper.h"
#include "llvm/Transforms/Coroutines/CoroEarly.h"
#include "llvm/Transforms/Coroutines/CoroElide.h"
#include "llvm/Transforms/Coroutines/CoroSplit.h"
#include "llvm/Transforms/HipStdPar/HipStdPar.h"
#include "llvm/Transforms/IPO/AlwaysInliner.h"
#include "llvm/Transforms/IPO/Annotation2Metadata.h"
#include "llvm/Transforms/IPO/ArgumentPromotion.h"
#include "llvm/Transforms/IPO/Attributor.h"
#include "llvm/Transforms/IPO/CalledValuePropagation.h"
#include "llvm/Transforms/IPO/ConstantMerge.h"
#include "llvm/Transforms/IPO/CrossDSOCFI.h"
#include "llvm/Transforms/IPO/DeadArgumentElimination.h"
#include "llvm/Transforms/IPO/ElimAvailExtern.h"
#include "llvm/Transforms/IPO/EmbedBitcodePass.h"
#include "llvm/Transforms/IPO/ExpandVariadics.h"
#include "llvm/Transforms/IPO/ForceFunctionAttrs.h"
#include "llvm/Transforms/IPO/FunctionAttrs.h"
#include "llvm/Transforms/IPO/GlobalDCE.h"
#include "llvm/Transforms/IPO/GlobalOpt.h"
#include "llvm/Transforms/IPO/GlobalSplit.h"
#include "llvm/Transforms/IPO/HotColdSplitting.h"
#include "llvm/Transforms/IPO/IROutliner.h"
#include "llvm/Transforms/IPO/InferFunctionAttrs.h"
#include "llvm/Transforms/IPO/Inliner.h"
#include "llvm/Transforms/IPO/LowerTypeTests.h"
#include "llvm/Transforms/IPO/MemProfContextDisambiguation.h"
#include "llvm/Transforms/IPO/MergeFunctions.h"
#include "llvm/Transforms/IPO/ModuleInliner.h"
#include "llvm/Transforms/IPO/OpenMPOpt.h"
#include "llvm/Transforms/IPO/PartialInlining.h"
#include "llvm/Transforms/IPO/SCCP.h"
#include "llvm/Transforms/IPO/SampleProfile.h"
#include "llvm/Transforms/IPO/SampleProfileProbe.h"
#include "llvm/Transforms/IPO/SyntheticCountsPropagation.h"
#include "llvm/Transforms/IPO/WholeProgramDevirt.h"
#include "llvm/Transforms/InstCombine/InstCombine.h"
#include "llvm/Transforms/Instrumentation/CGProfile.h"
#include "llvm/Transforms/Instrumentation/ControlHeightReduction.h"
#include "llvm/Transforms/Instrumentation/InstrOrderFile.h"
#include "llvm/Transforms/Instrumentation/InstrProfiling.h"
#include "llvm/Transforms/Instrumentation/MemProfiler.h"
#include "llvm/Transforms/Instrumentation/PGOCtxProfLowering.h"
#include "llvm/Transforms/Instrumentation/PGOForceFunctionAttrs.h"
#include "llvm/Transforms/Instrumentation/PGOInstrumentation.h"
#include "llvm/Transforms/Scalar/ADCE.h"
#include "llvm/Transforms/Scalar/AlignmentFromAssumptions.h"
#include "llvm/Transforms/Scalar/AnnotationRemarks.h"
#include "llvm/Transforms/Scalar/BDCE.h"
#include "llvm/Transforms/Scalar/CallSiteSplitting.h"
#include "llvm/Transforms/Scalar/ConstraintElimination.h"
#include "llvm/Transforms/Scalar/CorrelatedValuePropagation.h"
#include "llvm/Transforms/Scalar/DFAJumpThreading.h"
#include "llvm/Transforms/Scalar/DeadStoreElimination.h"
#include "llvm/Transforms/Scalar/DivRemPairs.h"
#include "llvm/Transforms/Scalar/EarlyCSE.h"
#include "llvm/Transforms/Scalar/Float2Int.h"
#include "llvm/Transforms/Scalar/GVN.h"
#include "llvm/Transforms/Scalar/IndVarSimplify.h"
#include "llvm/Transforms/Scalar/InferAlignment.h"
#include "llvm/Transforms/Scalar/InstSimplifyPass.h"
#include "llvm/Transforms/Scalar/JumpTableToSwitch.h"
#include "llvm/Transforms/Scalar/JumpThreading.h"
#include "llvm/Transforms/Scalar/LICM.h"
#include "llvm/Transforms/Scalar/LoopDeletion.h"
#include "llvm/Transforms/Scalar/LoopDistribute.h"
#include "llvm/Transforms/Scalar/LoopFlatten.h"
#include "llvm/Transforms/Scalar/LoopIdiomRecognize.h"
#include "llvm/Transforms/Scalar/LoopInstSimplify.h"
#include "llvm/Transforms/Scalar/LoopInterchange.h"
#include "llvm/Transforms/Scalar/LoopLoadElimination.h"
#include "llvm/Transforms/Scalar/LoopPassManager.h"
#include "llvm/Transforms/Scalar/LoopRotation.h"
#include "llvm/Transforms/Scalar/LoopSimplifyCFG.h"
#include "llvm/Transforms/Scalar/LoopSink.h"
#include "llvm/Transforms/Scalar/LoopUnrollAndJamPass.h"
#include "llvm/Transforms/Scalar/LoopUnrollPass.h"
#include "llvm/Transforms/Scalar/LoopVersioningLICM.h"
#include "llvm/Transforms/Scalar/LowerConstantIntrinsics.h"
#include "llvm/Transforms/Scalar/LowerExpectIntrinsic.h"
#include "llvm/Transforms/Scalar/LowerMatrixIntrinsics.h"
#include "llvm/Transforms/Scalar/MemCpyOptimizer.h"
#include "llvm/Transforms/Scalar/MergedLoadStoreMotion.h"
#include "llvm/Transforms/Scalar/NewGVN.h"
#include "llvm/Transforms/Scalar/Reassociate.h"
#include "llvm/Transforms/Scalar/SCCP.h"
#include "llvm/Transforms/Scalar/SROA.h"
#include "llvm/Transforms/Scalar/SimpleLoopUnswitch.h"
#include "llvm/Transforms/Scalar/SimplifyCFG.h"
#include "llvm/Transforms/Scalar/SpeculativeExecution.h"
#include "llvm/Transforms/Scalar/TailRecursionElimination.h"
#include "llvm/Transforms/Scalar/WarnMissedTransforms.h"
#include "llvm/Transforms/Utils/AddDiscriminators.h"
#include "llvm/Transforms/Utils/AssumeBundleBuilder.h"
#include "llvm/Transforms/Utils/CanonicalizeAliases.h"
#include "llvm/Transforms/Utils/CountVisits.h"
#include "llvm/Transforms/Utils/EntryExitInstrumenter.h"
#include "llvm/Transforms/Utils/InjectTLIMappings.h"
#include "llvm/Transforms/Utils/LibCallsShrinkWrap.h"
#include "llvm/Transforms/Utils/Mem2Reg.h"
#include "llvm/Transforms/Utils/MoveAutoInit.h"
#include "llvm/Transforms/Utils/NameAnonGlobals.h"
#include "llvm/Transforms/Utils/RelLookupTableConverter.h"
#include "llvm/Transforms/Utils/SimplifyCFGOptions.h"
#include "llvm/Transforms/Vectorize/LoopVectorize.h"
#include "llvm/Transforms/Vectorize/SLPVectorizer.h"
#include "llvm/Transforms/Vectorize/VectorCombine.h"
Go to the source code of this file.
Namespaces | |
namespace | llvm |
This is an optimization pass for GlobalISel generic memory operations. | |
Functions | |
static void | addAnnotationRemarksPass (ModulePassManager &MPM) |
static bool | isLTOPreLink (ThinOrFullLTOPhase Phase) |
static InlineParams | getInlineParamsFromOptLevel (OptimizationLevel Level) |
Variables | |
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 > | EnableSyntheticCounts ("enable-npm-synthetic-counts", cl::Hidden, cl::desc("Run synthetic function entry count generation " "pass")) |
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< bool > | EnableModuleInliner ("enable-module-inliner", cl::init(false), cl::Hidden, cl::desc("Enable module inliner")) |
static cl::opt< bool > | PerformMandatoryInliningsFirst ("mandatory-inlining-first", cl::init(false), cl::Hidden, cl::desc("Perform mandatory inlinings module-wide, before performing " "inlining")) |
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 > | EnableMergeFunctions ("enable-merge-functions", cl::init(false), cl::Hidden, cl::desc("Enable function merging as part of the optimization pipeline")) |
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 cl::opt< bool > | EnableGlobalAnalyses ("enable-global-analyses", cl::init(true), cl::Hidden, cl::desc("Enable inter-procedural analyses")) |
static cl::opt< bool > | RunPartialInlining ("enable-partial-inlining", cl::init(false), cl::Hidden, cl::desc("Run Partial inlinining pass")) |
static cl::opt< bool > | ExtraVectorizerPasses ("extra-vectorizer-passes", cl::init(false), cl::Hidden, cl::desc("Run cleanup optimization passes after vectorization")) |
static cl::opt< bool > | RunNewGVN ("enable-newgvn", cl::init(false), cl::Hidden, cl::desc("Run the NewGVN pass")) |
static cl::opt< bool > | EnableLoopInterchange ("enable-loopinterchange", cl::init(false), cl::Hidden, cl::desc("Enable the experimental LoopInterchange Pass")) |
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 > | EnableLoopFlatten ("enable-loop-flatten", cl::init(false), cl::Hidden, cl::desc("Enable the LoopFlatten Pass")) |
static cl::opt< bool > | EnableLoopHeaderDuplication ("enable-loop-header-duplication", cl::init(false), cl::Hidden, cl::desc("Enable loop header duplication at any optimization level")) |
static cl::opt< bool > | EnableDFAJumpThreading ("enable-dfa-jump-thread", cl::desc("Enable DFA jump threading"), cl::init(false), cl::Hidden) |
static cl::opt< bool > | EnablePGOForceFunctionAttrs ("enable-pgo-force-function-attrs", cl::desc("Enable pass to set function attributes based on PGO profiles"), cl::init(false)) |
static cl::opt< bool > | EnableHotColdSplit ("hot-cold-split", cl::desc("Enable hot-cold splitting pass")) |
static cl::opt< bool > | EnableIROutliner ("ir-outliner", cl::init(false), cl::Hidden, cl::desc("Enable ir outliner pass")) |
static cl::opt< bool > | DisablePreInliner ("disable-preinline", cl::init(false), cl::Hidden, cl::desc("Disable pre-instrumentation inliner")) |
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 > | EnableGVNHoist ("enable-gvn-hoist", cl::desc("Enable the GVN hoisting pass (default = off)")) |
static cl::opt< bool > | EnableGVNSink ("enable-gvn-sink", cl::desc("Enable the GVN sinking pass (default = off)")) |
static cl::opt< bool > | EnableJumpTableToSwitch ("enable-jump-table-to-switch", cl::desc("Enable JumpTableToSwitch pass (default = off)")) |
static cl::opt< bool > | EnableCHR ("enable-chr", cl::init(true), cl::Hidden, cl::desc("Enable control height reduction optimization (CHR)")) |
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 > | EnableOrderFileInstrumentation ("enable-order-file-instrumentation", cl::init(false), cl::Hidden, cl::desc("Enable order file instrumentation (default = off)")) |
static cl::opt< bool > | EnableMatrix ("enable-matrix", cl::init(false), cl::Hidden, cl::desc("Enable lowering of the matrix intrinsics")) |
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< 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 > | EnableSampledInstr ("enable-sampled-instrumentation", cl::init(false), cl::Hidden, cl::desc("Enable profile instrumentation sampling (default = off)")) |
static cl::opt< bool > | UseLoopVersioningLICM ("enable-loop-versioning-licm", cl::init(false), cl::Hidden, cl::desc("Enable the experimental Loop Versioning LICM pass")) |
cl::opt< std::string > | UseCtxProfile |
cl::opt< bool > | llvm::EnableInferAlignmentPass |
This file provides the implementation of the PassBuilder based on our static pass registry as well as related functionality.
It also provides helpers to aid in analyzing, debugging, and testing passes and pass pipelines.
Definition in file PassBuilderPipelines.cpp.
|
static |
Definition at line 397 of file PassBuilderPipelines.cpp.
References llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::addPass(), and llvm::createModuleToFunctionPassAdaptor().
Referenced by llvm::PassBuilder::buildFatLTODefaultPipeline(), llvm::PassBuilder::buildLTODefaultPipeline(), llvm::PassBuilder::buildPerModuleDefaultPipeline(), llvm::PassBuilder::buildThinLTODefaultPipeline(), and llvm::PassBuilder::buildThinLTOPreLinkDefaultPipeline().
|
static |
Definition at line 896 of file PassBuilderPipelines.cpp.
References llvm::getInlineParams().
Referenced by llvm::PassBuilder::buildInlinerPipeline(), llvm::PassBuilder::buildLTODefaultPipeline(), and llvm::PassBuilder::buildModuleInlinerPipeline().
|
static |
Definition at line 402 of file PassBuilderPipelines.cpp.
References llvm::FullLTOPreLink, Phase, and llvm::ThinLTOPreLink.
Referenced by llvm::PassBuilder::buildFunctionSimplificationPipeline(), llvm::PassBuilder::buildModuleOptimizationPipeline(), and llvm::PassBuilder::buildModuleSimplificationPipeline().
|
static |
|
static |
|
static |
Referenced by llvm::PassBuilder::buildModuleOptimizationPipeline().
|
static |
|
static |
Referenced by llvm::PassBuilder::buildFunctionSimplificationPipeline().
|
static |
Referenced by llvm::PipelineTuningOptions::PipelineTuningOptions().
|
static |
Referenced by llvm::PassBuilder::buildFunctionSimplificationPipeline().
|
static |
Referenced by llvm::PassBuilder::buildFunctionSimplificationPipeline().
|
static |
Referenced by llvm::PassBuilder::buildModuleOptimizationPipeline().
|
static |
Referenced by llvm::PassBuilder::buildFunctionSimplificationPipeline().
|
static |
|
static |
Referenced by llvm::PassBuilder::buildFunctionSimplificationPipeline().
|
static |
Referenced by llvm::PipelineTuningOptions::PipelineTuningOptions().
|
static |
Referenced by llvm::PassBuilder::buildModuleOptimizationPipeline().
|
static |
Referenced by llvm::PassBuilder::buildModuleSimplificationPipeline().
|
static |
Flag to enable inline deferral during PGO.
Referenced by llvm::PassBuilder::buildInlinerPipeline(), and llvm::PassBuilder::buildModuleInlinerPipeline().
|
static |
|
static |
Referenced by llvm::PassBuilder::buildModuleSimplificationPipeline().
|
static |
Referenced by llvm::PassBuilder::buildModuleSimplificationPipeline().
|
static |
|
static |
|
static |
Referenced by llvm::PassBuilder::buildModuleSimplificationPipeline().
|
static |
Referenced by llvm::PassBuilder::buildInlinerPipeline().
|
static |
|
extern |
|
static |
|
static |
Referenced by llvm::PassBuilder::buildModuleOptimizationPipeline().