LLVM  12.0.0git
PassManagerBuilder.h
Go to the documentation of this file.
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 
23 
24 /**
25  * @defgroup LLVMCTransformsPassManagerBuilder Pass manager builder
26  * @ingroup LLVMCTransforms
27  *
28  * @{
29  */
30 
31 /** See llvm::PassManagerBuilder. */
34 
35 /** See llvm::PassManagerBuilder::OptLevel. */
36 void
38  unsigned OptLevel);
39 
40 /** See llvm::PassManagerBuilder::SizeLevel. */
41 void
43  unsigned SizeLevel);
44 
45 /** See llvm::PassManagerBuilder::DisableUnitAtATime. */
46 void
48  LLVMBool Value);
49 
50 /** See llvm::PassManagerBuilder::DisableUnrollLoops. */
51 void
53  LLVMBool Value);
54 
55 /** See llvm::PassManagerBuilder::DisableSimplifyLibCalls */
56 void
58  LLVMBool Value);
59 
60 /** See llvm::PassManagerBuilder::Inliner. */
61 void
63  unsigned Threshold);
64 
65 /** See llvm::PassManagerBuilder::populateFunctionPassManager. */
66 void
69 
70 /** See llvm::PassManagerBuilder::populateModulePassManager. */
71 void
74 
75 /** See llvm::PassManagerBuilder::populateLTOPassManager. */
78  LLVMBool Internalize,
79  LLVMBool RunInliner);
80 
81 /**
82  * @}
83  */
84 
86 
87 #endif
void LLVMPassManagerBuilderSetOptLevel(LLVMPassManagerBuilderRef PMB, unsigned OptLevel)
See llvm::PassManagerBuilder::OptLevel.
void LLVMPassManagerBuilderSetDisableSimplifyLibCalls(LLVMPassManagerBuilderRef PMB, LLVMBool Value)
See llvm::PassManagerBuilder::DisableSimplifyLibCalls.
void LLVMPassManagerBuilderSetDisableUnrollLoops(LLVMPassManagerBuilderRef PMB, LLVMBool Value)
See llvm::PassManagerBuilder::DisableUnrollLoops.
void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM, LLVMBool Internalize, LLVMBool RunInliner)
See llvm::PassManagerBuilder::populateLTOPassManager.
void LLVMPassManagerBuilderSetSizeLevel(LLVMPassManagerBuilderRef PMB, unsigned SizeLevel)
See llvm::PassManagerBuilder::SizeLevel.
struct LLVMOpaquePassManagerBuilder * LLVMPassManagerBuilderRef
void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB)
int LLVMBool
Definition: Types.h:28
struct LLVMOpaquePassManager * LLVMPassManagerRef
Definition: Types.h:127
static cl::opt< unsigned > Threshold("loop-unswitch-threshold", cl::desc("Max loop size to unswitch"), cl::init(100), cl::Hidden)
LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate(void)
See llvm::PassManagerBuilder.
void LLVMPassManagerBuilderPopulateModulePassManager(LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM)
See llvm::PassManagerBuilder::populateModulePassManager.
#define LLVM_C_EXTERN_C_END
Definition: ExternC.h:36
#define LLVM_C_EXTERN_C_BEGIN
Definition: ExternC.h:35
void LLVMPassManagerBuilderSetDisableUnitAtATime(LLVMPassManagerBuilderRef PMB, LLVMBool Value)
See llvm::PassManagerBuilder::DisableUnitAtATime.
void LLVMPassManagerBuilderPopulateFunctionPassManager(LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM)
See llvm::PassManagerBuilder::populateFunctionPassManager.
void LLVMPassManagerBuilderUseInlinerWithThreshold(LLVMPassManagerBuilderRef PMB, unsigned Threshold)
See llvm::PassManagerBuilder::Inliner.