1 /*===-- llvm-c/Transform/PassManagerBuilder.h - PMB C Interface ---*- C -*-===*\
2 |*                                                                            *|
3 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM          *|
4 |* Exceptions.                                                                *|
5 |* See https://llvm.org/LICENSE.txt for license information.                  *|
6 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    *|
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/ExternC.h"
18 #include "llvm-c/Types.h"
19 
20 typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef;
21 
22 LLVM_C_EXTERN_C_BEGIN
23 
24 /**
25  * @defgroup LLVMCTransformsPassManagerBuilder Pass manager builder
26  * @ingroup LLVMCTransforms
27  *
28  * @{
29  */
30 
31 /** See llvm::PassManagerBuilder. */
32 LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate(void);
33 void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB);
34 
35 /** See llvm::PassManagerBuilder::OptLevel. */
36 void
37 LLVMPassManagerBuilderSetOptLevel(LLVMPassManagerBuilderRef PMB,
38                                   unsigned OptLevel);
39 
40 /** See llvm::PassManagerBuilder::SizeLevel. */
41 void
42 LLVMPassManagerBuilderSetSizeLevel(LLVMPassManagerBuilderRef PMB,
43                                    unsigned SizeLevel);
44 
45 /** See llvm::PassManagerBuilder::DisableUnitAtATime. */
46 void
47 LLVMPassManagerBuilderSetDisableUnitAtATime(LLVMPassManagerBuilderRef PMB,
48                                             LLVMBool Value);
49 
50 /** See llvm::PassManagerBuilder::DisableUnrollLoops. */
51 void
52 LLVMPassManagerBuilderSetDisableUnrollLoops(LLVMPassManagerBuilderRef PMB,
53                                             LLVMBool Value);
54 
55 /** See llvm::PassManagerBuilder::DisableSimplifyLibCalls */
56 void
57 LLVMPassManagerBuilderSetDisableSimplifyLibCalls(LLVMPassManagerBuilderRef PMB,
58                                                  LLVMBool Value);
59 
60 /** See llvm::PassManagerBuilder::Inliner. */
61 void
62 LLVMPassManagerBuilderUseInlinerWithThreshold(LLVMPassManagerBuilderRef PMB,
63                                               unsigned Threshold);
64 
65 /** See llvm::PassManagerBuilder::populateFunctionPassManager. */
66 void
67 LLVMPassManagerBuilderPopulateFunctionPassManager(LLVMPassManagerBuilderRef PMB,
68                                                   LLVMPassManagerRef PM);
69 
70 /** See llvm::PassManagerBuilder::populateModulePassManager. */
71 void
72 LLVMPassManagerBuilderPopulateModulePassManager(LLVMPassManagerBuilderRef PMB,
73                                                 LLVMPassManagerRef PM);
74 
75 /** See llvm::PassManagerBuilder::populateLTOPassManager. */
76 void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB,
77                                                   LLVMPassManagerRef PM,
78                                                   LLVMBool Internalize,
79                                                   LLVMBool RunInliner);
80 
81 /**
82  * @}
83  */
84 
85 LLVM_C_EXTERN_C_END
86 
87 #endif
88