[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / include / llvm-c / Transforms / PassManagerBuilder.h
blob6e13e18e063beb1a398e1afafed1e19f219a53cd
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 \*===----------------------------------------------------------------------===*/
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;
22 LLVM_C_EXTERN_C_BEGIN
24 /**
25 * @defgroup LLVMCTransformsPassManagerBuilder Pass manager builder
26 * @ingroup LLVMCTransforms
28 * @{
31 /** See llvm::PassManagerBuilder. */
32 LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate(void);
33 void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB);
35 /** See llvm::PassManagerBuilder::OptLevel. */
36 void
37 LLVMPassManagerBuilderSetOptLevel(LLVMPassManagerBuilderRef PMB,
38 unsigned OptLevel);
40 /** See llvm::PassManagerBuilder::SizeLevel. */
41 void
42 LLVMPassManagerBuilderSetSizeLevel(LLVMPassManagerBuilderRef PMB,
43 unsigned SizeLevel);
45 /** See llvm::PassManagerBuilder::DisableUnitAtATime. */
46 void
47 LLVMPassManagerBuilderSetDisableUnitAtATime(LLVMPassManagerBuilderRef PMB,
48 LLVMBool Value);
50 /** See llvm::PassManagerBuilder::DisableUnrollLoops. */
51 void
52 LLVMPassManagerBuilderSetDisableUnrollLoops(LLVMPassManagerBuilderRef PMB,
53 LLVMBool Value);
55 /** See llvm::PassManagerBuilder::DisableSimplifyLibCalls */
56 void
57 LLVMPassManagerBuilderSetDisableSimplifyLibCalls(LLVMPassManagerBuilderRef PMB,
58 LLVMBool Value);
60 /** See llvm::PassManagerBuilder::Inliner. */
61 void
62 LLVMPassManagerBuilderUseInlinerWithThreshold(LLVMPassManagerBuilderRef PMB,
63 unsigned Threshold);
65 /** See llvm::PassManagerBuilder::populateFunctionPassManager. */
66 void
67 LLVMPassManagerBuilderPopulateFunctionPassManager(LLVMPassManagerBuilderRef PMB,
68 LLVMPassManagerRef PM);
70 /** See llvm::PassManagerBuilder::populateModulePassManager. */
71 void
72 LLVMPassManagerBuilderPopulateModulePassManager(LLVMPassManagerBuilderRef PMB,
73 LLVMPassManagerRef PM);
75 /** See llvm::PassManagerBuilder::populateLTOPassManager. */
76 void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB,
77 LLVMPassManagerRef PM,
78 LLVMBool Internalize,
79 LLVMBool RunInliner);
81 /**
82 * @}
85 LLVM_C_EXTERN_C_END
87 #endif