LLVM  8.0.0svn
Macros | Functions | Variables
PassBuilder.cpp File Reference

This file provides the implementation of the PassBuilder based on our static pass registry as well as related functionality. More...

#include "llvm/Passes/PassBuilder.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/AliasAnalysisEvaluator.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/BasicAliasAnalysis.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/CFGPrinter.h"
#include "llvm/Analysis/CFLAndersAliasAnalysis.h"
#include "llvm/Analysis/CFLSteensAliasAnalysis.h"
#include "llvm/Analysis/CGSCCPassManager.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/DemandedBits.h"
#include "llvm/Analysis/DependenceAnalysis.h"
#include "llvm/Analysis/DominanceFrontier.h"
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/IVUsers.h"
#include "llvm/Analysis/LazyCallGraph.h"
#include "llvm/Analysis/LazyValueInfo.h"
#include "llvm/Analysis/LoopAccessAnalysis.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
#include "llvm/Analysis/MemorySSA.h"
#include "llvm/Analysis/ModuleSummaryAnalysis.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/PhiValues.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/Analysis/ProfileSummaryInfo.h"
#include "llvm/Analysis/RegionInfo.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h"
#include "llvm/Analysis/ScopedNoAliasAA.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Analysis/TypeBasedAliasAnalysis.h"
#include "llvm/CodeGen/PreISelIntrinsicLowering.h"
#include "llvm/CodeGen/UnreachableBlockElim.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Regex.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h"
#include "llvm/Transforms/IPO/AlwaysInliner.h"
#include "llvm/Transforms/IPO/ArgumentPromotion.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/ForceFunctionAttrs.h"
#include "llvm/Transforms/IPO/FunctionAttrs.h"
#include "llvm/Transforms/IPO/FunctionImport.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/InferFunctionAttrs.h"
#include "llvm/Transforms/IPO/Inliner.h"
#include "llvm/Transforms/IPO/Internalize.h"
#include "llvm/Transforms/IPO/LowerTypeTests.h"
#include "llvm/Transforms/IPO/PartialInlining.h"
#include "llvm/Transforms/IPO/SCCP.h"
#include "llvm/Transforms/IPO/SampleProfile.h"
#include "llvm/Transforms/IPO/StripDeadPrototypes.h"
#include "llvm/Transforms/IPO/SyntheticCountsPropagation.h"
#include "llvm/Transforms/IPO/WholeProgramDevirt.h"
#include "llvm/Transforms/InstCombine/InstCombine.h"
#include "llvm/Transforms/Instrumentation/AddressSanitizerPass.h"
#include "llvm/Transforms/Instrumentation/BoundsChecking.h"
#include "llvm/Transforms/Instrumentation/CGProfile.h"
#include "llvm/Transforms/Instrumentation/ControlHeightReduction.h"
#include "llvm/Transforms/Instrumentation/GCOVProfiler.h"
#include "llvm/Transforms/Instrumentation/InstrProfiling.h"
#include "llvm/Transforms/Instrumentation/PGOInstrumentation.h"
#include "llvm/Transforms/Scalar/ADCE.h"
#include "llvm/Transforms/Scalar/AlignmentFromAssumptions.h"
#include "llvm/Transforms/Scalar/BDCE.h"
#include "llvm/Transforms/Scalar/CallSiteSplitting.h"
#include "llvm/Transforms/Scalar/ConstantHoisting.h"
#include "llvm/Transforms/Scalar/CorrelatedValuePropagation.h"
#include "llvm/Transforms/Scalar/DCE.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/GuardWidening.h"
#include "llvm/Transforms/Scalar/IVUsersPrinter.h"
#include "llvm/Transforms/Scalar/IndVarSimplify.h"
#include "llvm/Transforms/Scalar/InductiveRangeCheckElimination.h"
#include "llvm/Transforms/Scalar/InstSimplifyPass.h"
#include "llvm/Transforms/Scalar/JumpThreading.h"
#include "llvm/Transforms/Scalar/LICM.h"
#include "llvm/Transforms/Scalar/LoopAccessAnalysisPrinter.h"
#include "llvm/Transforms/Scalar/LoopDataPrefetch.h"
#include "llvm/Transforms/Scalar/LoopDeletion.h"
#include "llvm/Transforms/Scalar/LoopDistribute.h"
#include "llvm/Transforms/Scalar/LoopIdiomRecognize.h"
#include "llvm/Transforms/Scalar/LoopInstSimplify.h"
#include "llvm/Transforms/Scalar/LoopLoadElimination.h"
#include "llvm/Transforms/Scalar/LoopPassManager.h"
#include "llvm/Transforms/Scalar/LoopPredication.h"
#include "llvm/Transforms/Scalar/LoopRotation.h"
#include "llvm/Transforms/Scalar/LoopSimplifyCFG.h"
#include "llvm/Transforms/Scalar/LoopSink.h"
#include "llvm/Transforms/Scalar/LoopStrengthReduce.h"
#include "llvm/Transforms/Scalar/LoopUnrollAndJamPass.h"
#include "llvm/Transforms/Scalar/LoopUnrollPass.h"
#include "llvm/Transforms/Scalar/LowerAtomic.h"
#include "llvm/Transforms/Scalar/LowerExpectIntrinsic.h"
#include "llvm/Transforms/Scalar/LowerGuardIntrinsic.h"
#include "llvm/Transforms/Scalar/MemCpyOptimizer.h"
#include "llvm/Transforms/Scalar/MergedLoadStoreMotion.h"
#include "llvm/Transforms/Scalar/NaryReassociate.h"
#include "llvm/Transforms/Scalar/NewGVN.h"
#include "llvm/Transforms/Scalar/PartiallyInlineLibCalls.h"
#include "llvm/Transforms/Scalar/Reassociate.h"
#include "llvm/Transforms/Scalar/RewriteStatepointsForGC.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/Sink.h"
#include "llvm/Transforms/Scalar/SpeculateAroundPHIs.h"
#include "llvm/Transforms/Scalar/SpeculativeExecution.h"
#include "llvm/Transforms/Scalar/TailRecursionElimination.h"
#include "llvm/Transforms/Utils/AddDiscriminators.h"
#include "llvm/Transforms/Utils/BreakCriticalEdges.h"
#include "llvm/Transforms/Utils/EntryExitInstrumenter.h"
#include "llvm/Transforms/Utils/LCSSA.h"
#include "llvm/Transforms/Utils/LibCallsShrinkWrap.h"
#include "llvm/Transforms/Utils/LoopSimplify.h"
#include "llvm/Transforms/Utils/LowerInvoke.h"
#include "llvm/Transforms/Utils/Mem2Reg.h"
#include "llvm/Transforms/Utils/NameAnonGlobals.h"
#include "llvm/Transforms/Utils/SymbolRewriter.h"
#include "llvm/Transforms/Vectorize/LoopVectorize.h"
#include "llvm/Transforms/Vectorize/SLPVectorizer.h"
#include "PassRegistry.def"

Go to the source code of this file.

Macros

#define MODULE_ANALYSIS(NAME, CREATE_PASS)   MAM.registerPass([&] { return CREATE_PASS; });
 
#define CGSCC_ANALYSIS(NAME, CREATE_PASS)   CGAM.registerPass([&] { return CREATE_PASS; });
 
#define FUNCTION_ANALYSIS(NAME, CREATE_PASS)   FAM.registerPass([&] { return CREATE_PASS; });
 
#define LOOP_ANALYSIS(NAME, CREATE_PASS)   LAM.registerPass([&] { return CREATE_PASS; });
 
#define MODULE_PASS(NAME, CREATE_PASS)
 
#define MODULE_ANALYSIS(NAME, CREATE_PASS)
 
#define CGSCC_PASS(NAME, CREATE_PASS)
 
#define CGSCC_ANALYSIS(NAME, CREATE_PASS)
 
#define FUNCTION_PASS(NAME, CREATE_PASS)
 
#define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
 
#define LOOP_PASS(NAME, CREATE_PASS)
 
#define LOOP_ANALYSIS(NAME, CREATE_PASS)
 
#define MODULE_PASS(NAME, CREATE_PASS)
 
#define MODULE_ANALYSIS(NAME, CREATE_PASS)
 
#define CGSCC_PASS(NAME, CREATE_PASS)
 
#define CGSCC_ANALYSIS(NAME, CREATE_PASS)
 
#define FUNCTION_PASS(NAME, CREATE_PASS)
 
#define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
 
#define LOOP_PASS(NAME, CREATE_PASS)
 
#define LOOP_ANALYSIS(NAME, CREATE_PASS)
 
#define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS)
 
#define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS)
 

Functions

static bool isOptimizingForSize (PassBuilder::OptimizationLevel Level)
 
static InlineParams getInlineParamsFromOptLevel (PassBuilder::OptimizationLevel Level)
 
static Optional< int > parseRepeatPassName (StringRef Name)
 
static Optional< int > parseDevirtPassName (StringRef Name)
 
static bool startsWithDefaultPipelineAliasPrefix (StringRef Name)
 Tests whether a pass name starts with a valid prefix for a default pipeline alias. More...
 
template<typename PassManagerT , typename CallbacksT >
static bool callbacksAcceptPassName (StringRef Name, CallbacksT &Callbacks)
 Tests whether registered callbacks will accept a given pass name. More...
 
template<typename CallbacksT >
static bool isModulePassName (StringRef Name, CallbacksT &Callbacks)
 
template<typename CallbacksT >
static bool isCGSCCPassName (StringRef Name, CallbacksT &Callbacks)
 
template<typename CallbacksT >
static bool isFunctionPassName (StringRef Name, CallbacksT &Callbacks)
 
template<typename CallbacksT >
static bool isLoopPassName (StringRef Name, CallbacksT &Callbacks)
 

Variables

static cl::opt< unsignedMaxDevirtIterations ("pm-max-devirt-iterations", cl::ReallyHidden, cl::init(4))
 
static cl::opt< boolRunPartialInlining ("enable-npm-partial-inlining", cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::desc("Run Partial inlinining pass"))
 
static cl::opt< boolRunNewGVN ("enable-npm-newgvn", cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::desc("Run NewGVN instead of GVN"))
 
static cl::opt< boolEnableEarlyCSEMemSSA ("enable-npm-earlycse-memssa", cl::init(true), cl::Hidden, cl::desc("Enable the EarlyCSE w/ MemorySSA pass for the new PM (default = on)"))
 
static cl::opt< boolEnableGVNHoist ("enable-npm-gvn-hoist", cl::init(false), cl::Hidden, cl::desc("Enable the GVN hoisting pass for the new PM (default = off)"))
 
static cl::opt< boolEnableGVNSink ("enable-npm-gvn-sink", cl::init(false), cl::Hidden, cl::desc("Enable the GVN hoisting pass for the new PM (default = off)"))
 
static cl::opt< boolEnableUnrollAndJam ("enable-npm-unroll-and-jam", cl::init(false), cl::Hidden, cl::desc("Enable the Unroll and Jam pass for the new PM (default = off)"))
 
static cl::opt< boolEnableSyntheticCounts ("enable-npm-synthetic-counts", cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::desc("Run synthetic function entry count generation " "pass"))
 
static Regex DefaultAliasRegex ("^(default|thinlto-pre-link|thinlto|lto-pre-link|lto)<(O[0123sz])>$")
 
static cl::opt< boolEnableCHR ("enable-chr-npm", cl::init(true), cl::Hidden, cl::desc("Enable control height reduction optimization (CHR)"))
 
cl::opt< boolEnableHotColdSplit
 

Detailed Description

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 PassBuilder.cpp.

Macro Definition Documentation

◆ CGSCC_ANALYSIS [1/3]

#define CGSCC_ANALYSIS (   NAME,
  CREATE_PASS 
)    CGAM.registerPass([&] { return CREATE_PASS; });

◆ CGSCC_ANALYSIS [2/3]

#define CGSCC_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == "require<" NAME ">" || Name == "invalidate<" NAME ">") \
return true;
amdgpu Simplify well known AMD library false Value Value const Twine & Name

◆ CGSCC_ANALYSIS [3/3]

#define CGSCC_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == "require<" NAME ">") { \
CGPM.addPass(RequireAnalysisPass< \
std::remove_reference<decltype(CREATE_PASS)>::type, \
return Error::success(); \
} \
if (Name == "invalidate<" NAME ">") { \
CGPM.addPass(InvalidateAnalysisPass< \
std::remove_reference<decltype(CREATE_PASS)>::type>()); \
return Error::success(); \
}
A utility pass template to force an analysis result to be available.
Definition: PassManager.h:1349
Support structure for SCC passes to communicate updates the call graph back to the CGSCC pass manager...
amdgpu Simplify well known AMD library false Value Value const Twine & Name
A lazily constructed view of the call graph of a module.
success
Parameters (see the expansion example below): (the builder, addr, loaded, new_val, ordering, /* OUT.
A no-op pass template which simply forces a specific analysis result to be invalidated.
Definition: PassManager.h:1370
An SCC of the call graph.
A container for analyses that lazily runs them and caches their results.

◆ CGSCC_PASS [1/2]

#define CGSCC_PASS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == NAME) \
return true;
amdgpu Simplify well known AMD library false Value Value const Twine & Name

◆ CGSCC_PASS [2/2]

#define CGSCC_PASS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == NAME) { \
CGPM.addPass(CREATE_PASS); \
return Error::success(); \
}
amdgpu Simplify well known AMD library false Value Value const Twine & Name
success
Parameters (see the expansion example below): (the builder, addr, loaded, new_val, ordering, /* OUT.

◆ FUNCTION_ALIAS_ANALYSIS

#define FUNCTION_ALIAS_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == NAME) { \
AA.registerFunctionAnalysis< \
std::remove_reference<decltype(CREATE_PASS)>::type>(); \
return true; \
}
amdgpu Simplify well known AMD library false Value Value const Twine & Name

◆ FUNCTION_ANALYSIS [1/3]

#define FUNCTION_ANALYSIS (   NAME,
  CREATE_PASS 
)    FAM.registerPass([&] { return CREATE_PASS; });

◆ FUNCTION_ANALYSIS [2/3]

#define FUNCTION_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == "require<" NAME ">" || Name == "invalidate<" NAME ">") \
return true;
amdgpu Simplify well known AMD library false Value Value const Twine & Name

◆ FUNCTION_ANALYSIS [3/3]

#define FUNCTION_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == "require<" NAME ">") { \
FPM.addPass( \
std::remove_reference<decltype(CREATE_PASS)>::type, Function>()); \
return Error::success(); \
} \
if (Name == "invalidate<" NAME ">") { \
FPM.addPass(InvalidateAnalysisPass< \
std::remove_reference<decltype(CREATE_PASS)>::type>()); \
return Error::success(); \
}
A utility pass template to force an analysis result to be available.
Definition: PassManager.h:1349
amdgpu Simplify well known AMD library false Value Value const Twine & Name
success
Parameters (see the expansion example below): (the builder, addr, loaded, new_val, ordering, /* OUT.
A no-op pass template which simply forces a specific analysis result to be invalidated.
Definition: PassManager.h:1370

◆ FUNCTION_PASS [1/2]

#define FUNCTION_PASS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == NAME) \
return true;
amdgpu Simplify well known AMD library false Value Value const Twine & Name

◆ FUNCTION_PASS [2/2]

#define FUNCTION_PASS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == NAME) { \
FPM.addPass(CREATE_PASS); \
return Error::success(); \
}
amdgpu Simplify well known AMD library false Value Value const Twine & Name
success
Parameters (see the expansion example below): (the builder, addr, loaded, new_val, ordering, /* OUT.

◆ LOOP_ANALYSIS [1/3]

#define LOOP_ANALYSIS (   NAME,
  CREATE_PASS 
)    LAM.registerPass([&] { return CREATE_PASS; });

◆ LOOP_ANALYSIS [2/3]

#define LOOP_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == "require<" NAME ">" || Name == "invalidate<" NAME ">") \
return true;
amdgpu Simplify well known AMD library false Value Value const Twine & Name

◆ LOOP_ANALYSIS [3/3]

#define LOOP_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == "require<" NAME ">") { \
LPM.addPass(RequireAnalysisPass< \
std::remove_reference<decltype(CREATE_PASS)>::type, Loop, \
LPMUpdater &>()); \
return Error::success(); \
} \
if (Name == "invalidate<" NAME ">") { \
LPM.addPass(InvalidateAnalysisPass< \
std::remove_reference<decltype(CREATE_PASS)>::type>()); \
return Error::success(); \
}
The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...
A utility pass template to force an analysis result to be available.
Definition: PassManager.h:1349
amdgpu Simplify well known AMD library false Value Value const Twine & Name
This class provides an interface for updating the loop pass manager based on mutations to the loop ne...
success
Parameters (see the expansion example below): (the builder, addr, loaded, new_val, ordering, /* OUT.
Represents a single loop in the control flow graph.
Definition: LoopInfo.h:459
A no-op pass template which simply forces a specific analysis result to be invalidated.
Definition: PassManager.h:1370
A container for analyses that lazily runs them and caches their results.

◆ LOOP_PASS [1/2]

#define LOOP_PASS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == NAME) \
return true;
amdgpu Simplify well known AMD library false Value Value const Twine & Name

◆ LOOP_PASS [2/2]

#define LOOP_PASS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == NAME) { \
LPM.addPass(CREATE_PASS); \
return Error::success(); \
}
amdgpu Simplify well known AMD library false Value Value const Twine & Name
success
Parameters (see the expansion example below): (the builder, addr, loaded, new_val, ordering, /* OUT.

◆ MODULE_ALIAS_ANALYSIS

#define MODULE_ALIAS_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == NAME) { \
AA.registerModuleAnalysis< \
std::remove_reference<decltype(CREATE_PASS)>::type>(); \
return true; \
}
amdgpu Simplify well known AMD library false Value Value const Twine & Name

◆ MODULE_ANALYSIS [1/3]

#define MODULE_ANALYSIS (   NAME,
  CREATE_PASS 
)    MAM.registerPass([&] { return CREATE_PASS; });

◆ MODULE_ANALYSIS [2/3]

#define MODULE_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == "require<" NAME ">" || Name == "invalidate<" NAME ">") \
return true;
amdgpu Simplify well known AMD library false Value Value const Twine & Name

◆ MODULE_ANALYSIS [3/3]

#define MODULE_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == "require<" NAME ">") { \
MPM.addPass( \
std::remove_reference<decltype(CREATE_PASS)>::type, Module>()); \
return Error::success(); \
} \
if (Name == "invalidate<" NAME ">") { \
MPM.addPass(InvalidateAnalysisPass< \
std::remove_reference<decltype(CREATE_PASS)>::type>()); \
return Error::success(); \
}
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:64
A utility pass template to force an analysis result to be available.
Definition: PassManager.h:1349
amdgpu Simplify well known AMD library false Value Value const Twine & Name
success
Parameters (see the expansion example below): (the builder, addr, loaded, new_val, ordering, /* OUT.
A no-op pass template which simply forces a specific analysis result to be invalidated.
Definition: PassManager.h:1370

◆ MODULE_PASS [1/2]

#define MODULE_PASS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == NAME) \
return true;
amdgpu Simplify well known AMD library false Value Value const Twine & Name

◆ MODULE_PASS [2/2]

#define MODULE_PASS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == NAME) { \
MPM.addPass(CREATE_PASS); \
return Error::success(); \
}
amdgpu Simplify well known AMD library false Value Value const Twine & Name
success
Parameters (see the expansion example below): (the builder, addr, loaded, new_val, ordering, /* OUT.

Function Documentation

◆ callbacksAcceptPassName()

template<typename PassManagerT , typename CallbacksT >
static bool callbacksAcceptPassName ( StringRef  Name,
CallbacksT &  Callbacks 
)
static

Tests whether registered callbacks will accept a given pass name.

When parsing a pipeline text, the type of the outermost pipeline may be omitted, in which case the type is automatically determined from the first pass name in the text. This may be a name that is handled through one of the callbacks. We check this through the oridinary parsing callbacks by setting up a dummy PassManager in order to not force the client to also handle this type of query.

Definition at line 1241 of file PassBuilder.cpp.

◆ getInlineParamsFromOptLevel()

static InlineParams getInlineParamsFromOptLevel ( PassBuilder::OptimizationLevel  Level)
static

◆ isCGSCCPassName()

template<typename CallbacksT >
static bool isCGSCCPassName ( StringRef  Name,
CallbacksT &  Callbacks 
)
static

◆ isFunctionPassName()

template<typename CallbacksT >
static bool isFunctionPassName ( StringRef  Name,
CallbacksT &  Callbacks 
)
static

Definition at line 1306 of file PassBuilder.cpp.

References Name, and parseRepeatPassName().

Referenced by llvm::PassBuilder::parsePassPipeline().

◆ isLoopPassName()

template<typename CallbacksT >
static bool isLoopPassName ( StringRef  Name,
CallbacksT &  Callbacks 
)
static

◆ isModulePassName()

template<typename CallbacksT >
static bool isModulePassName ( StringRef  Name,
CallbacksT &  Callbacks 
)
static

◆ isOptimizingForSize()

static bool isOptimizingForSize ( PassBuilder::OptimizationLevel  Level)
static

◆ parseDevirtPassName()

static Optional<int> parseDevirtPassName ( StringRef  Name)
static

◆ parseRepeatPassName()

static Optional<int> parseRepeatPassName ( StringRef  Name)
static

◆ startsWithDefaultPipelineAliasPrefix()

static bool startsWithDefaultPipelineAliasPrefix ( StringRef  Name)
static

Tests whether a pass name starts with a valid prefix for a default pipeline alias.

Definition at line 1227 of file PassBuilder.cpp.

References llvm::StringRef::startswith().

Referenced by isModulePassName().

Variable Documentation

◆ DefaultAliasRegex

Regex DefaultAliasRegex("^(default|thinlto-pre-link|thinlto|lto-pre-link|lto)<(O[0123sz])>$")
static

Referenced by isModulePassName().

◆ EnableCHR

cl::opt<bool> EnableCHR("enable-chr-npm", cl::init(true), cl::Hidden, cl::desc("Enable control height reduction optimization (CHR)"))
static

◆ EnableEarlyCSEMemSSA

cl::opt<bool> EnableEarlyCSEMemSSA("enable-npm-earlycse-memssa", cl::init(true), cl::Hidden, cl::desc("Enable the EarlyCSE w/ MemorySSA pass for the new PM (default = on)"))
static

◆ EnableGVNHoist

cl::opt<bool> EnableGVNHoist("enable-npm-gvn-hoist", cl::init(false), cl::Hidden, cl::desc("Enable the GVN hoisting pass for the new PM (default = off)"))
static

◆ EnableGVNSink

cl::opt<bool> EnableGVNSink("enable-npm-gvn-sink", cl::init(false), cl::Hidden, cl::desc("Enable the GVN hoisting pass for the new PM (default = off)"))
static

◆ EnableHotColdSplit

cl::opt<bool> EnableHotColdSplit

◆ EnableSyntheticCounts

cl::opt<bool> EnableSyntheticCounts("enable-npm-synthetic-counts", cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::desc("Run synthetic function entry count generation " "pass"))
static

◆ EnableUnrollAndJam

cl::opt<bool> EnableUnrollAndJam("enable-npm-unroll-and-jam", cl::init(false), cl::Hidden, cl::desc("Enable the Unroll and Jam pass for the new PM (default = off)"))
static

◆ MaxDevirtIterations

cl::opt<unsigned> MaxDevirtIterations("pm-max-devirt-iterations", cl::ReallyHidden, cl::init(4))
static

◆ RunNewGVN

cl::opt<bool> RunNewGVN("enable-npm-newgvn", cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::desc("Run NewGVN instead of GVN"))
static

◆ RunPartialInlining

cl::opt<bool> RunPartialInlining("enable-npm-partial-inlining", cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::desc("Run Partial inlinining pass"))
static