69 return wrap(std::move(Err));
87 return wrap(std::move(Err));
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
static TargetMachine * unwrap(LLVMTargetMachineRef P)
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.
A container for analyses that lazily runs them and caches their results.
bool registerPass(PassBuilderT &&PassBuilder)
Register an analysis pass with the manager.
Module * getParent()
Get the module that this global value is contained inside of...
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.
Error parseAAPipeline(AAManager &AA, StringRef PipelineText)
Parse a textual alias analysis pipeline into the provided AA manager.
void registerLoopAnalyses(LoopAnalysisManager &LAM)
Registers all available loop analysis passes.
void crossRegisterProxies(LoopAnalysisManager &LAM, FunctionAnalysisManager &FAM, CGSCCAnalysisManager &CGAM, ModuleAnalysisManager &MAM, MachineFunctionAnalysisManager *MFAM=nullptr)
Cross register the analysis managers through their proxies.
Error parsePassPipeline(ModulePassManager &MPM, StringRef PipelineText)
Parse a textual pass pipeline description into a ModulePassManager.
void registerModuleAnalyses(ModuleAnalysisManager &MAM)
Registers all available module analysis passes.
void registerCGSCCAnalyses(CGSCCAnalysisManager &CGAM)
Registers all available CGSCC analysis passes.
void registerFunctionAnalyses(FunctionAnalysisManager &FAM)
Registers all available function analysis passes.
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 LLVMPassBuilderOptionsSetMergeFunctions(LLVMPassBuilderOptionsRef Options, LLVMBool MergeFunctions)
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 LLVMPassBuilderOptionsSetVerifyEach(LLVMPassBuilderOptionsRef Options, LLVMBool VerifyEach)
Toggle adding the VerifierPass for the PassBuilder, ensuring all functions inside the module is valid...
void LLVMPassBuilderOptionsSetLicmMssaOptCap(LLVMPassBuilderOptionsRef Options, unsigned LicmMssaOptCap)
void LLVMDisposePassBuilderOptions(LLVMPassBuilderOptionsRef Options)
Dispose of a heap-allocated PassBuilderOptions instance.
void LLVMPassBuilderOptionsSetLicmMssaNoAccForPromotionCap(LLVMPassBuilderOptionsRef Options, unsigned LicmMssaNoAccForPromotionCap)
void LLVMPassBuilderOptionsSetInlinerThreshold(LLVMPassBuilderOptionsRef Options, int Threshold)
void LLVMPassBuilderOptionsSetSLPVectorization(LLVMPassBuilderOptionsRef Options, LLVMBool SLPVectorization)
void LLVMPassBuilderOptionsSetCallGraphProfile(LLVMPassBuilderOptionsRef Options, LLVMBool CallGraphProfile)
void LLVMPassBuilderOptionsSetLoopVectorization(LLVMPassBuilderOptionsRef Options, LLVMBool LoopVectorization)
void LLVMPassBuilderOptionsSetLoopUnrolling(LLVMPassBuilderOptionsRef Options, LLVMBool LoopUnrolling)
void LLVMPassBuilderOptionsSetAAPipeline(LLVMPassBuilderOptionsRef Options, const char *AAPipeline)
Specify a custom alias analysis pipeline for the PassBuilder to be used instead of the default one.
typedefLLVM_C_EXTERN_C_BEGIN struct LLVMOpaquePassBuilderOptions * LLVMPassBuilderOptionsRef
A set of options passed which are attached to the Pass Manager upon run.
void LLVMPassBuilderOptionsSetForgetAllSCEVInLoopUnroll(LLVMPassBuilderOptionsRef Options, LLVMBool ForgetAllSCEVInLoopUnroll)
void LLVMPassBuilderOptionsSetLoopInterleaving(LLVMPassBuilderOptionsRef Options, LLVMBool LoopInterleaving)
LLVMErrorRef LLVMRunPasses(LLVMModuleRef M, const char *Passes, LLVMTargetMachineRef TM, LLVMPassBuilderOptionsRef Options)
Construct and run a set of passes over a module.
LLVMErrorRef LLVMRunPassesOnFunction(LLVMValueRef F, const char *Passes, LLVMTargetMachineRef TM, LLVMPassBuilderOptionsRef Options)
Construct and run a set of passes over a function.
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,...
This is an optimization pass for GlobalISel generic memory operations.
LLVMAttributeRef wrap(Attribute Attr)
This class manages callbacks registration, as well as provides a way for PassInstrumentation to pass ...