#include "llvm-c/Transforms/PassBuilder.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Passes/PassBuilder.h"
#include "llvm/Passes/StandardInstrumentations.h"
#include "llvm/Support/CBindingWrapping.h"
usingnamespacellvm;
namespace llvm {
class LLVMPassBuilderOptions { … };
}
static TargetMachine *unwrap(LLVMTargetMachineRef P) { … }
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(…)
static LLVMErrorRef runPasses(Module *Mod, Function *Fun, const char *Passes,
TargetMachine *Machine,
LLVMPassBuilderOptions *PassOpts) { … }
LLVMErrorRef LLVMRunPasses(LLVMModuleRef M, const char *Passes,
LLVMTargetMachineRef TM,
LLVMPassBuilderOptionsRef Options) { … }
LLVMErrorRef LLVMRunPassesOnFunction(LLVMValueRef F, const char *Passes,
LLVMTargetMachineRef TM,
LLVMPassBuilderOptionsRef Options) { … }
LLVMPassBuilderOptionsRef LLVMCreatePassBuilderOptions() { … }
void LLVMPassBuilderOptionsSetVerifyEach(LLVMPassBuilderOptionsRef Options,
LLVMBool VerifyEach) { … }
void LLVMPassBuilderOptionsSetDebugLogging(LLVMPassBuilderOptionsRef Options,
LLVMBool DebugLogging) { … }
void LLVMPassBuilderOptionsSetAAPipeline(LLVMPassBuilderOptionsRef Options,
const char *AAPipeline) { … }
void LLVMPassBuilderOptionsSetLoopInterleaving(
LLVMPassBuilderOptionsRef Options, LLVMBool LoopInterleaving) { … }
void LLVMPassBuilderOptionsSetLoopVectorization(
LLVMPassBuilderOptionsRef Options, LLVMBool LoopVectorization) { … }
void LLVMPassBuilderOptionsSetSLPVectorization(
LLVMPassBuilderOptionsRef Options, LLVMBool SLPVectorization) { … }
void LLVMPassBuilderOptionsSetLoopUnrolling(LLVMPassBuilderOptionsRef Options,
LLVMBool LoopUnrolling) { … }
void LLVMPassBuilderOptionsSetForgetAllSCEVInLoopUnroll(
LLVMPassBuilderOptionsRef Options, LLVMBool ForgetAllSCEVInLoopUnroll) { … }
void LLVMPassBuilderOptionsSetLicmMssaOptCap(LLVMPassBuilderOptionsRef Options,
unsigned LicmMssaOptCap) { … }
void LLVMPassBuilderOptionsSetLicmMssaNoAccForPromotionCap(
LLVMPassBuilderOptionsRef Options, unsigned LicmMssaNoAccForPromotionCap) { … }
void LLVMPassBuilderOptionsSetCallGraphProfile(
LLVMPassBuilderOptionsRef Options, LLVMBool CallGraphProfile) { … }
void LLVMPassBuilderOptionsSetMergeFunctions(LLVMPassBuilderOptionsRef Options,
LLVMBool MergeFunctions) { … }
void LLVMPassBuilderOptionsSetInlinerThreshold(
LLVMPassBuilderOptionsRef Options, int Threshold) { … }
void LLVMDisposePassBuilderOptions(LLVMPassBuilderOptionsRef Options) { … }