[lit] Add argument check: --timeout must be non-negative integer
[llvm-core.git] / include / llvm-c / Transforms / Scalar.h
blob6f3a3d8b3750f663aacfa6bfa9bd933ebc56a41e
1 /*===-- Scalar.h - Scalar Transformation Library 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 libLLVMScalarOpts.a, which *|
11 |* implements various scalar transformations of the LLVM IR. *|
12 |* *|
13 |* Many exotic languages can interoperate with C code but have a harder time *|
14 |* with C++ due to name mangling. So in addition to C, this interface enables *|
15 |* tools written in such languages. *|
16 |* *|
17 \*===----------------------------------------------------------------------===*/
19 #ifndef LLVM_C_TRANSFORMS_SCALAR_H
20 #define LLVM_C_TRANSFORMS_SCALAR_H
22 #include "llvm-c/Types.h"
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 /**
29 * @defgroup LLVMCTransformsScalar Scalar transformations
30 * @ingroup LLVMCTransforms
32 * @{
35 /** See llvm::createAggressiveDCEPass function. */
36 void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM);
38 /** See llvm::createDeadCodeEliminationPass function. */
39 void LLVMAddDCEPass(LLVMPassManagerRef PM);
41 /** See llvm::createBitTrackingDCEPass function. */
42 void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM);
44 /** See llvm::createAlignmentFromAssumptionsPass function. */
45 void LLVMAddAlignmentFromAssumptionsPass(LLVMPassManagerRef PM);
47 /** See llvm::createCFGSimplificationPass function. */
48 void LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM);
50 /** See llvm::createDeadStoreEliminationPass function. */
51 void LLVMAddDeadStoreEliminationPass(LLVMPassManagerRef PM);
53 /** See llvm::createScalarizerPass function. */
54 void LLVMAddScalarizerPass(LLVMPassManagerRef PM);
56 /** See llvm::createMergedLoadStoreMotionPass function. */
57 void LLVMAddMergedLoadStoreMotionPass(LLVMPassManagerRef PM);
59 /** See llvm::createGVNPass function. */
60 void LLVMAddGVNPass(LLVMPassManagerRef PM);
62 /** See llvm::createGVNPass function. */
63 void LLVMAddNewGVNPass(LLVMPassManagerRef PM);
65 /** See llvm::createIndVarSimplifyPass function. */
66 void LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM);
68 /** See llvm::createInstructionCombiningPass function. */
69 void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM);
71 /** See llvm::createJumpThreadingPass function. */
72 void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM);
74 /** See llvm::createLICMPass function. */
75 void LLVMAddLICMPass(LLVMPassManagerRef PM);
77 /** See llvm::createLoopDeletionPass function. */
78 void LLVMAddLoopDeletionPass(LLVMPassManagerRef PM);
80 /** See llvm::createLoopIdiomPass function */
81 void LLVMAddLoopIdiomPass(LLVMPassManagerRef PM);
83 /** See llvm::createLoopRotatePass function. */
84 void LLVMAddLoopRotatePass(LLVMPassManagerRef PM);
86 /** See llvm::createLoopRerollPass function. */
87 void LLVMAddLoopRerollPass(LLVMPassManagerRef PM);
89 /** See llvm::createLoopUnrollPass function. */
90 void LLVMAddLoopUnrollPass(LLVMPassManagerRef PM);
92 /** See llvm::createLoopUnrollAndJamPass function. */
93 void LLVMAddLoopUnrollAndJamPass(LLVMPassManagerRef PM);
95 /** See llvm::createLoopUnswitchPass function. */
96 void LLVMAddLoopUnswitchPass(LLVMPassManagerRef PM);
98 /** See llvm::createLowerAtomicPass function. */
99 void LLVMAddLowerAtomicPass(LLVMPassManagerRef PM);
101 /** See llvm::createMemCpyOptPass function. */
102 void LLVMAddMemCpyOptPass(LLVMPassManagerRef PM);
104 /** See llvm::createPartiallyInlineLibCallsPass function. */
105 void LLVMAddPartiallyInlineLibCallsPass(LLVMPassManagerRef PM);
107 /** See llvm::createReassociatePass function. */
108 void LLVMAddReassociatePass(LLVMPassManagerRef PM);
110 /** See llvm::createSCCPPass function. */
111 void LLVMAddSCCPPass(LLVMPassManagerRef PM);
113 /** See llvm::createSROAPass function. */
114 void LLVMAddScalarReplAggregatesPass(LLVMPassManagerRef PM);
116 /** See llvm::createSROAPass function. */
117 void LLVMAddScalarReplAggregatesPassSSA(LLVMPassManagerRef PM);
119 /** See llvm::createSROAPass function. */
120 void LLVMAddScalarReplAggregatesPassWithThreshold(LLVMPassManagerRef PM,
121 int Threshold);
123 /** See llvm::createSimplifyLibCallsPass function. */
124 void LLVMAddSimplifyLibCallsPass(LLVMPassManagerRef PM);
126 /** See llvm::createTailCallEliminationPass function. */
127 void LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM);
129 /** See llvm::createConstantPropagationPass function. */
130 void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM);
132 /** See llvm::demotePromoteMemoryToRegisterPass function. */
133 void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM);
135 /** See llvm::createVerifierPass function. */
136 void LLVMAddVerifierPass(LLVMPassManagerRef PM);
138 /** See llvm::createCorrelatedValuePropagationPass function */
139 void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM);
141 /** See llvm::createEarlyCSEPass function */
142 void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM);
144 /** See llvm::createEarlyCSEPass function */
145 void LLVMAddEarlyCSEMemSSAPass(LLVMPassManagerRef PM);
147 /** See llvm::createLowerExpectIntrinsicPass function */
148 void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM);
150 /** See llvm::createLowerConstantIntrinsicsPass function */
151 void LLVMAddLowerConstantIntrinsicsPass(LLVMPassManagerRef PM);
153 /** See llvm::createTypeBasedAliasAnalysisPass function */
154 void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM);
156 /** See llvm::createScopedNoAliasAAPass function */
157 void LLVMAddScopedNoAliasAAPass(LLVMPassManagerRef PM);
159 /** See llvm::createBasicAliasAnalysisPass function */
160 void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM);
162 /** See llvm::createUnifyFunctionExitNodesPass function */
163 void LLVMAddUnifyFunctionExitNodesPass(LLVMPassManagerRef PM);
166 * @}
169 #ifdef __cplusplus
171 #endif /* defined(__cplusplus) */
173 #endif