16 #ifndef LLVM_PASSES_PASSBUILDER_H 17 #define LLVM_PASSES_PASSBUILDER_H 30 class ModuleSummaryIndex;
176 : TM(TM), PGOOpt(PGOOpt) {}
235 bool DebugLogging =
false);
255 bool DebugLogging =
false);
271 bool DebugLogging =
false);
285 bool DebugLogging =
false);
301 bool DebugLogging =
false);
331 bool DebugLogging =
false);
382 bool VerifyEachPass =
true,
bool DebugLogging =
false);
392 bool VerifyEachPass =
true,
bool DebugLogging =
false);
394 bool VerifyEachPass =
true,
bool DebugLogging =
false);
396 bool VerifyEachPass =
true,
bool DebugLogging =
false);
424 PeepholeEPCallbacks.push_back(
C);
438 LateLoopOptimizationsEPCallbacks.push_back(
C);
448 LoopOptimizerEndEPCallbacks.push_back(
C);
458 ScalarOptimizerLateEPCallbacks.push_back(
C);
469 CGSCCOptimizerLateEPCallbacks.push_back(
C);
480 VectorizerStartEPCallbacks.push_back(
C);
490 PipelineStartEPCallbacks.push_back(
C);
497 AAParsingCallbacks.push_back(
C);
505 CGSCCAnalysisRegistrationCallbacks.push_back(
C);
509 FunctionAnalysisRegistrationCallbacks.push_back(
C);
513 LoopAnalysisRegistrationCallbacks.push_back(
C);
517 ModuleAnalysisRegistrationCallbacks.push_back(
C);
528 CGSCCPipelineParsingCallbacks.push_back(
C);
533 FunctionPipelineParsingCallbacks.push_back(
C);
538 LoopPipelineParsingCallbacks.push_back(
C);
543 ModulePipelineParsingCallbacks.push_back(
C);
554 bool VerifyEachPass,
bool DebugLogging)> &
C) {
555 TopLevelPipelineParsingCallbacks.push_back(
C);
563 bool VerifyEachPass,
bool DebugLogging);
565 bool VerifyEachPass,
bool DebugLogging);
567 bool VerifyEachPass,
bool DebugLogging);
569 bool VerifyEachPass,
bool DebugLogging);
574 bool VerifyEachPass,
bool DebugLogging);
577 bool VerifyEachPass,
bool DebugLogging);
580 bool VerifyEachPass,
bool DebugLogging);
583 bool VerifyEachPass,
bool DebugLogging);
596 LateLoopOptimizationsEPCallbacks;
598 LoopOptimizerEndEPCallbacks;
600 ScalarOptimizerLateEPCallbacks;
602 CGSCCOptimizerLateEPCallbacks;
604 VectorizerStartEPCallbacks;
607 PipelineStartEPCallbacks;
609 ModuleAnalysisRegistrationCallbacks;
613 ModulePipelineParsingCallbacks;
615 bool VerifyEachPass,
bool DebugLogging)>,
617 TopLevelPipelineParsingCallbacks;
620 CGSCCAnalysisRegistrationCallbacks;
624 CGSCCPipelineParsingCallbacks;
627 FunctionAnalysisRegistrationCallbacks;
631 FunctionPipelineParsingCallbacks;
634 LoopAnalysisRegistrationCallbacks;
638 LoopPipelineParsingCallbacks;
658 template <
typename AnalysisT,
typename IRUnitT,
typename AnalysisManagerT,
659 typename... ExtraArgTs>
667 PipelineName = PipelineName.
substr(11, PipelineName.
size() - 12);
668 if (PipelineName != AnalysisName)
676 PipelineName = PipelineName.
substr(8, PipelineName.
size() - 9);
677 if (PipelineName != AnalysisName)
void registerPipelineParsingCallback(const std::function< bool(StringRef Name, CGSCCPassManager &, ArrayRef< PipelineElement >)> &C)
{{@ Register pipeline parsing callbacks with this pass builder instance.
Compute iterated dominance frontiers using a linear time algorithm.
This header provides classes for managing a pipeline of passes over loops in LLVM IR...
std::string ProfileUseFile
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
OptimizationLevel
LLVM-provided high-level optimization levels.
A utility pass template to force an analysis result to be available.
std::string SampleProfileFile
PassBuilder(TargetMachine *TM=nullptr, Optional< PGOOptions > PGOOpt=None)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool endswith(StringRef Suffix) const
Check if this string ends with the given Suffix.
Similar to O2 but tries to optimize for small code size instead of fast execution without triggering ...
This class provides access to building LLVM's passes.
std::string ProfileGenFile
void registerPipelineParsingCallback(const std::function< bool(StringRef Name, ModulePassManager &, ArrayRef< PipelineElement >)> &C)
PGOOptions(std::string ProfileGenFile="", std::string ProfileUseFile="", std::string SampleProfileFile="", bool RunProfileGen=false, bool SamplePGOSupport=false)
void registerLoopOptimizerEndEPCallback(const std::function< void(LoopPassManager &, OptimizationLevel)> &C)
Register a callback for a default optimizer pipeline extension point.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
void registerAnalysisRegistrationCallback(const std::function< void(ModuleAnalysisManager &)> &C)
falkor hwpf fix Falkor HW Prefetch Fix Late Phase
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
Class to hold module path string table and global value map, and encapsulate methods for operating on...
void registerLateLoopOptimizationsEPCallback(const std::function< void(LoopPassManager &, OptimizationLevel)> &C)
Register a callback for a default optimizer pipeline extension point.
void registerPipelineParsingCallback(const std::function< bool(StringRef Name, FunctionPassManager &, ArrayRef< PipelineElement >)> &C)
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
void registerPipelineStartEPCallback(const std::function< void(ModulePassManager &)> &C)
Register a callback for a default optimizer pipeline extension point.
Disable as many optimizations as possible.
A manager for alias analyses.
void registerVectorizerStartEPCallback(const std::function< void(FunctionPassManager &, OptimizationLevel)> &C)
Register a callback for a default optimizer pipeline extension point.
ThinLTOPhase
ThinLTO phase.
Optimize for fast execution as much as possible.
void registerParseAACallback(const std::function< bool(StringRef Name, AAManager &AA)> &C)
Register a callback for parsing an AliasAnalysis Name to populate the given AAManager AA...
void registerAnalysisRegistrationCallback(const std::function< void(FunctionAnalysisManager &)> &C)
bool parseAnalysisUtilityPasses(StringRef AnalysisName, StringRef PipelineName, PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs... > &PM)
This utility template takes care of adding require<> and invalidate<> passes for an analysis to a giv...
A struct to capture parsed pass pipeline names.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Optimize for fast execution as much as possible without triggering significant incremental compile ti...
std::vector< PipelineElement > InnerPipeline
void registerPeepholeEPCallback(const std::function< void(FunctionPassManager &, OptimizationLevel)> &C)
Register a callback for a default optimizer pipeline extension point.
Manages a sequence of passes over a particular unit of IR.
A struct capturing PGO tunables.
A no-op pass template which simply forces a specific analysis result to be invalidated.
This header provides classes for managing passes over SCCs of the call graph.
void registerParseTopLevelPipelineCallback(const std::function< bool(ModulePassManager &, ArrayRef< PipelineElement >, bool VerifyEachPass, bool DebugLogging)> &C)
Register a callback for a top-level pipeline entry.
void registerAnalysisRegistrationCallback(const std::function< void(CGSCCAnalysisManager &)> &C)
{{@ Register callbacks for analysis registration with this PassBuilder instance.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Optimize quickly without destroying debuggability.
void registerCGSCCOptimizerLateEPCallback(const std::function< void(CGSCCPassManager &, OptimizationLevel)> &C)
Register a callback for a default optimizer pipeline extension point.
Primary interface to the complete machine description for the target machine.
print Print MemDeps of function
StringRef - Represent a constant reference to a string, i.e.
A container for analyses that lazily runs them and caches their results.
void registerAnalysisRegistrationCallback(const std::function< void(LoopAnalysisManager &)> &C)
void registerPipelineParsingCallback(const std::function< bool(StringRef Name, LoopPassManager &, ArrayRef< PipelineElement >)> &C)
This header defines various interfaces for pass management in LLVM.
void registerScalarOptimizerLateEPCallback(const std::function< void(FunctionPassManager &, OptimizationLevel)> &C)
Register a callback for a default optimizer pipeline extension point.