1 /*===-- llvm-c/Transform/PassManagerBuilder.h - PMB C Interface ---*- C -*-===*\ 2 |* *| 3 |* The LLVM Compiler Infrastructure *| 4 |* *| 5 |* This file is distributed under the University of Illinois Open Source *| 6 |* License. See LICENSE.TXT for details. *| 7 |* *| 8 |*===----------------------------------------------------------------------===*| 9 |* *| 10 |* This header declares the C interface to the PassManagerBuilder class. *| 11 |* *| 12 \*===----------------------------------------------------------------------===*/ 13 14 #ifndef LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H 15 #define LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H 16 17 #include "llvm-c/Core.h" 18 19 typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef; 20 21 #ifdef __cplusplus 22 #include "llvm/Transforms/IPO/PassManagerBuilder.h" 23 extern "C" { 24 #endif 25 26 /** 27 * @defgroup LLVMCTransformsPassManagerBuilder Pass manager builder 28 * @ingroup LLVMCTransforms 29 * 30 * @{ 31 */ 32 33 /** See llvm::PassManagerBuilder. */ 34 LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate(void); 35 void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB); 36 37 /** See llvm::PassManagerBuilder::OptLevel. */ 38 void 39 LLVMPassManagerBuilderSetOptLevel(LLVMPassManagerBuilderRef PMB, 40 unsigned OptLevel); 41 42 /** See llvm::PassManagerBuilder::SizeLevel. */ 43 void 44 LLVMPassManagerBuilderSetSizeLevel(LLVMPassManagerBuilderRef PMB, 45 unsigned SizeLevel); 46 47 /** See llvm::PassManagerBuilder::DisableUnitAtATime. */ 48 void 49 LLVMPassManagerBuilderSetDisableUnitAtATime(LLVMPassManagerBuilderRef PMB, 50 LLVMBool Value); 51 52 /** See llvm::PassManagerBuilder::DisableUnrollLoops. */ 53 void 54 LLVMPassManagerBuilderSetDisableUnrollLoops(LLVMPassManagerBuilderRef PMB, 55 LLVMBool Value); 56 57 /** See llvm::PassManagerBuilder::DisableSimplifyLibCalls */ 58 void 59 LLVMPassManagerBuilderSetDisableSimplifyLibCalls(LLVMPassManagerBuilderRef PMB, 60 LLVMBool Value); 61 62 /** See llvm::PassManagerBuilder::Inliner. */ 63 void 64 LLVMPassManagerBuilderUseInlinerWithThreshold(LLVMPassManagerBuilderRef PMB, 65 unsigned Threshold); 66 67 /** See llvm::PassManagerBuilder::populateFunctionPassManager. */ 68 void 69 LLVMPassManagerBuilderPopulateFunctionPassManager(LLVMPassManagerBuilderRef PMB, 70 LLVMPassManagerRef PM); 71 72 /** See llvm::PassManagerBuilder::populateModulePassManager. */ 73 void 74 LLVMPassManagerBuilderPopulateModulePassManager(LLVMPassManagerBuilderRef PMB, 75 LLVMPassManagerRef PM); 76 77 /** See llvm::PassManagerBuilder::populateLTOPassManager. */ 78 void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB, 79 LLVMPassManagerRef PM, 80 LLVMBool Internalize, 81 LLVMBool RunInliner); 82 83 /** 84 * @} 85 */ 86 87 #ifdef __cplusplus 88 } 89 #endif 90 91 #endif 92