2011-08-09 22:19:52 +00:00
|
|
|
/*===-- llvm-c/Transform/PassManagerBuilder.h - PMB C Interface ---*- C -*-===*\
|
|
|
|
|* *|
|
|
|
|
|* The LLVM Compiler Infrastructure *|
|
|
|
|
|* *|
|
|
|
|
|* This file is distributed under the University of Illinois Open Source *|
|
|
|
|
|* License. See LICENSE.TXT for details. *|
|
|
|
|
|* *|
|
|
|
|
|*===----------------------------------------------------------------------===*|
|
|
|
|
|* *|
|
|
|
|
|* This header declares the C interface to the PassManagerBuilder class. *|
|
|
|
|
|* *|
|
|
|
|
\*===----------------------------------------------------------------------===*/
|
|
|
|
|
2013-01-10 00:45:19 +00:00
|
|
|
#ifndef LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
|
|
|
|
#define LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
|
2011-08-09 22:19:52 +00:00
|
|
|
|
|
|
|
#include "llvm-c/Core.h"
|
|
|
|
|
|
|
|
typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2012-03-21 03:54:29 +00:00
|
|
|
/**
|
|
|
|
* @defgroup LLVMCTransformsPassManagerBuilder Pass manager builder
|
|
|
|
* @ingroup LLVMCTransforms
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2011-08-09 22:19:52 +00:00
|
|
|
/** See llvm::PassManagerBuilder. */
|
|
|
|
LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate(void);
|
|
|
|
void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB);
|
|
|
|
|
|
|
|
/** See llvm::PassManagerBuilder::OptLevel. */
|
|
|
|
void
|
|
|
|
LLVMPassManagerBuilderSetOptLevel(LLVMPassManagerBuilderRef PMB,
|
|
|
|
unsigned OptLevel);
|
|
|
|
|
|
|
|
/** See llvm::PassManagerBuilder::SizeLevel. */
|
|
|
|
void
|
|
|
|
LLVMPassManagerBuilderSetSizeLevel(LLVMPassManagerBuilderRef PMB,
|
|
|
|
unsigned SizeLevel);
|
|
|
|
|
|
|
|
/** See llvm::PassManagerBuilder::DisableUnitAtATime. */
|
|
|
|
void
|
|
|
|
LLVMPassManagerBuilderSetDisableUnitAtATime(LLVMPassManagerBuilderRef PMB,
|
|
|
|
LLVMBool Value);
|
|
|
|
|
|
|
|
/** See llvm::PassManagerBuilder::DisableUnrollLoops. */
|
|
|
|
void
|
|
|
|
LLVMPassManagerBuilderSetDisableUnrollLoops(LLVMPassManagerBuilderRef PMB,
|
|
|
|
LLVMBool Value);
|
|
|
|
|
|
|
|
/** See llvm::PassManagerBuilder::DisableSimplifyLibCalls */
|
|
|
|
void
|
|
|
|
LLVMPassManagerBuilderSetDisableSimplifyLibCalls(LLVMPassManagerBuilderRef PMB,
|
|
|
|
LLVMBool Value);
|
|
|
|
|
|
|
|
/** See llvm::PassManagerBuilder::Inliner. */
|
|
|
|
void
|
|
|
|
LLVMPassManagerBuilderUseInlinerWithThreshold(LLVMPassManagerBuilderRef PMB,
|
|
|
|
unsigned Threshold);
|
|
|
|
|
|
|
|
/** See llvm::PassManagerBuilder::populateFunctionPassManager. */
|
|
|
|
void
|
|
|
|
LLVMPassManagerBuilderPopulateFunctionPassManager(LLVMPassManagerBuilderRef PMB,
|
|
|
|
LLVMPassManagerRef PM);
|
|
|
|
|
|
|
|
/** See llvm::PassManagerBuilder::populateModulePassManager. */
|
|
|
|
void
|
|
|
|
LLVMPassManagerBuilderPopulateModulePassManager(LLVMPassManagerBuilderRef PMB,
|
|
|
|
LLVMPassManagerRef PM);
|
|
|
|
|
|
|
|
/** See llvm::PassManagerBuilder::populateLTOPassManager. */
|
|
|
|
void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB,
|
|
|
|
LLVMPassManagerRef PM,
|
|
|
|
bool Internalize,
|
|
|
|
bool RunInliner);
|
|
|
|
|
2012-03-21 03:54:29 +00:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
2011-08-09 22:19:52 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
inline PassManagerBuilder *unwrap(LLVMPassManagerBuilderRef P) {
|
|
|
|
return reinterpret_cast<PassManagerBuilder*>(P);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline LLVMPassManagerBuilderRef wrap(PassManagerBuilder *P) {
|
|
|
|
return reinterpret_cast<LLVMPassManagerBuilderRef>(P);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|