68 if (
auto Err =
PB.parseAAPipeline(
AA,
PassOpts->AAPipeline))
69 return wrap(std::move(Err));
70 FAM.registerPass([&] {
return std::move(
AA); });
73 PB.registerFunctionAnalyses(
FAM);
86 if (
auto Err =
PB.parsePassPipeline(FPM,
Passes))
87 return wrap(std::move(Err));
93 if (
auto Err =
PB.parsePassPipeline(MPM,
Passes))
94 return wrap(std::move(Err));
134 const char *AAPipeline) {
160 unwrap(
Options)->PTO.ForgetAllSCEVInLoopUnroll = ForgetAllSCEVInLoopUnroll;
164 unsigned LicmMssaOptCap) {
171 LicmMssaNoAccForPromotionCap;
#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)
static ManagedStatic< cl::opt< bool, true >, CreateDebug > Debug
Module.h This file contains the declarations for the Module class.
CGSCCAnalysisManager CGAM
Function const char TargetMachine * Machine
Function const char * Passes
if(auto Err=PB.parsePassPipeline(MPM, Passes)) return wrap(std MPM run * Mod
FunctionAnalysisManager FAM
ModuleAnalysisManager MAM
PassInstrumentationCallbacks PIC
Function const char TargetMachine LLVMPassBuilderOptions * PassOpts
PassBuilder PB(Machine, PassOpts->PTO, std::nullopt, &PIC)
This header defines a class that provides bookkeeping for all standard (i.e in-tree) pass instrumenta...
A manager for alias analyses.
Helper struct for holding a set of builder options for LLVMRunPasses.
PipelineTuningOptions PTO
LLVMPassBuilderOptions(bool DebugLogging=false, bool VerifyEach=false, const char *AAPipeline=nullptr, PipelineTuningOptions PTO=PipelineTuningOptions())
A Module instance is used to store all the information related to an LLVM module.
This class provides access to building LLVM's passes.
This class manages callbacks registration, as well as provides a way for PassInstrumentation to pass ...
LLVM_ATTRIBUTE_MINSIZE std::enable_if_t<!std::is_same_v< PassT, PassManager > > addPass(PassT &&Pass)
PreservedAnalyses run(IRUnitT &IR, AnalysisManagerT &AM, ExtraArgTs... ExtraArgs)
Run all of the passes in this manager over the given unit of IR.
Tunable parameters for passes in the default pipelines.
This class provides an interface to register all the standard pass instrumentations and manages their...
Primary interface to the complete machine description for the target machine.
void LLVMPassBuilderOptionsSetSLPVectorization(LLVMPassBuilderOptionsRef Options, LLVMBool SLPVectorization)
void LLVMPassBuilderOptionsSetAAPipeline(LLVMPassBuilderOptionsRef Options, const char *AAPipeline)
Specify a custom alias analysis pipeline for the PassBuilder to be used instead of the default one.
void LLVMPassBuilderOptionsSetLoopVectorization(LLVMPassBuilderOptionsRef Options, LLVMBool LoopVectorization)
void LLVMPassBuilderOptionsSetDebugLogging(LLVMPassBuilderOptionsRef Options, LLVMBool DebugLogging)
Toggle debug logging when running the PassBuilder.
LLVMPassBuilderOptionsRef LLVMCreatePassBuilderOptions()
Create a new set of options for a PassBuilder.
void LLVMDisposePassBuilderOptions(LLVMPassBuilderOptionsRef Options)
Dispose of a heap-allocated PassBuilderOptions instance.
void LLVMPassBuilderOptionsSetVerifyEach(LLVMPassBuilderOptionsRef Options, LLVMBool VerifyEach)
Toggle adding the VerifierPass for the PassBuilder, ensuring all functions inside the module is valid...
void LLVMPassBuilderOptionsSetForgetAllSCEVInLoopUnroll(LLVMPassBuilderOptionsRef Options, LLVMBool ForgetAllSCEVInLoopUnroll)
void LLVMPassBuilderOptionsSetMergeFunctions(LLVMPassBuilderOptionsRef Options, LLVMBool MergeFunctions)
void LLVMPassBuilderOptionsSetLoopInterleaving(LLVMPassBuilderOptionsRef Options, LLVMBool LoopInterleaving)
void LLVMPassBuilderOptionsSetLicmMssaOptCap(LLVMPassBuilderOptionsRef Options, unsigned LicmMssaOptCap)
typedefLLVM_C_EXTERN_C_BEGIN struct LLVMOpaquePassBuilderOptions * LLVMPassBuilderOptionsRef
A set of options passed which are attached to the Pass Manager upon run.
LLVMErrorRef LLVMRunPassesOnFunction(LLVMValueRef F, const char *Passes, LLVMTargetMachineRef TM, LLVMPassBuilderOptionsRef Options)
Construct and run a set of passes over a function.
void LLVMPassBuilderOptionsSetCallGraphProfile(LLVMPassBuilderOptionsRef Options, LLVMBool CallGraphProfile)
void LLVMPassBuilderOptionsSetLoopUnrolling(LLVMPassBuilderOptionsRef Options, LLVMBool LoopUnrolling)
void LLVMPassBuilderOptionsSetLicmMssaNoAccForPromotionCap(LLVMPassBuilderOptionsRef Options, unsigned LicmMssaNoAccForPromotionCap)
void LLVMPassBuilderOptionsSetInlinerThreshold(LLVMPassBuilderOptionsRef Options, int Threshold)
LLVMErrorRef LLVMRunPasses(LLVMModuleRef M, const char *Passes, LLVMTargetMachineRef TM, LLVMPassBuilderOptionsRef Options)
Construct and run a set of passes over a module.
struct LLVMOpaqueError * LLVMErrorRef
Opaque reference to an error instance.
struct LLVMOpaqueValue * LLVMValueRef
Represents an individual value in LLVM IR.
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.
struct LLVMOpaqueTargetMachine * LLVMTargetMachineRef
Interfaces for registering analysis passes, producing common pass manager configurations,...
Abstract Attribute helper functions.
This is an optimization pass for GlobalISel generic memory operations.
AnalysisManager< LazyCallGraph::SCC, LazyCallGraph & > CGSCCAnalysisManager
The CGSCC analysis manager.
AnalysisManager< Loop, LoopStandardAnalysisResults & > LoopAnalysisManager
The loop analysis manager.
PassManager< Module > ModulePassManager
Convenience typedef for a pass manager over modules.
Attribute unwrap(LLVMAttributeRef Attr)
PassManager< Function > FunctionPassManager
Convenience typedef for a pass manager over functions.
LLVMAttributeRef wrap(Attribute Attr)
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.