1 /*===-- llvm-c/Transform/PassManagerBuilder.h - PMB C Interface ---*- C -*-===*\
3 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
5 |* See https://llvm.org/LICENSE.txt for license information. *|
6 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
8 |*===----------------------------------------------------------------------===*|
10 |* This header declares the C interface to the PassManagerBuilder class. *|
12 \*===----------------------------------------------------------------------===*/
14 #ifndef LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
15 #define LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
17 #include "llvm-c/ExternC.h"
18 #include "llvm-c/Types.h"
20 typedef struct LLVMOpaquePassManagerBuilder
*LLVMPassManagerBuilderRef
;
25 * @defgroup LLVMCTransformsPassManagerBuilder Pass manager builder
26 * @ingroup LLVMCTransforms
31 /** See llvm::PassManagerBuilder. */
32 LLVMPassManagerBuilderRef
LLVMPassManagerBuilderCreate(void);
33 void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB
);
35 /** See llvm::PassManagerBuilder::OptLevel. */
37 LLVMPassManagerBuilderSetOptLevel(LLVMPassManagerBuilderRef PMB
,
40 /** See llvm::PassManagerBuilder::SizeLevel. */
42 LLVMPassManagerBuilderSetSizeLevel(LLVMPassManagerBuilderRef PMB
,
45 /** See llvm::PassManagerBuilder::DisableUnitAtATime. */
47 LLVMPassManagerBuilderSetDisableUnitAtATime(LLVMPassManagerBuilderRef PMB
,
50 /** See llvm::PassManagerBuilder::DisableUnrollLoops. */
52 LLVMPassManagerBuilderSetDisableUnrollLoops(LLVMPassManagerBuilderRef PMB
,
55 /** See llvm::PassManagerBuilder::DisableSimplifyLibCalls */
57 LLVMPassManagerBuilderSetDisableSimplifyLibCalls(LLVMPassManagerBuilderRef PMB
,
60 /** See llvm::PassManagerBuilder::Inliner. */
62 LLVMPassManagerBuilderUseInlinerWithThreshold(LLVMPassManagerBuilderRef PMB
,
65 /** See llvm::PassManagerBuilder::populateFunctionPassManager. */
67 LLVMPassManagerBuilderPopulateFunctionPassManager(LLVMPassManagerBuilderRef PMB
,
68 LLVMPassManagerRef PM
);
70 /** See llvm::PassManagerBuilder::populateModulePassManager. */
72 LLVMPassManagerBuilderPopulateModulePassManager(LLVMPassManagerBuilderRef PMB
,
73 LLVMPassManagerRef PM
);
75 /** See llvm::PassManagerBuilder::populateLTOPassManager. */
76 void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB
,
77 LLVMPassManagerRef PM
,