LLVM  8.0.1
Scalar.h
Go to the documentation of this file.
1 /*===-- Scalar.h - Scalar Transformation Library C Interface ----*- C++ -*-===*\
2 |* *|
3 |* The LLVM Compiler Infrastructure *|
4 |* *|
5 |* This file is distributed under the University of Illinois Open Source *|
6 |* License. See LICENSE.TXT for details. *|
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 \*===----------------------------------------------------------------------===*/
18 
19 #ifndef LLVM_C_TRANSFORMS_SCALAR_H
20 #define LLVM_C_TRANSFORMS_SCALAR_H
21 
22 #include "llvm-c/Types.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /**
29  * @defgroup LLVMCTransformsScalar Scalar transformations
30  * @ingroup LLVMCTransforms
31  *
32  * @{
33  */
34 
35 /** See llvm::createAggressiveDCEPass function. */
37 
38 /** See llvm::createBitTrackingDCEPass function. */
40 
41 /** See llvm::createAlignmentFromAssumptionsPass function. */
43 
44 /** See llvm::createCFGSimplificationPass function. */
46 
47 /** See llvm::createDeadStoreEliminationPass function. */
49 
50 /** See llvm::createScalarizerPass function. */
52 
53 /** See llvm::createMergedLoadStoreMotionPass function. */
55 
56 /** See llvm::createGVNPass function. */
58 
59 /** See llvm::createGVNPass function. */
61 
62 /** See llvm::createIndVarSimplifyPass function. */
64 
65 /** See llvm::createInstructionCombiningPass function. */
67 
68 /** See llvm::createJumpThreadingPass function. */
70 
71 /** See llvm::createLICMPass function. */
73 
74 /** See llvm::createLoopDeletionPass function. */
76 
77 /** See llvm::createLoopIdiomPass function */
79 
80 /** See llvm::createLoopRotatePass function. */
82 
83 /** See llvm::createLoopRerollPass function. */
85 
86 /** See llvm::createLoopUnrollPass function. */
88 
89 /** See llvm::createLoopUnrollAndJamPass function. */
91 
92 /** See llvm::createLoopUnswitchPass function. */
94 
95 /** See llvm::createLowerAtomicPass function. */
97 
98 /** See llvm::createMemCpyOptPass function. */
100 
101 /** See llvm::createPartiallyInlineLibCallsPass function. */
103 
104 /** See llvm::createReassociatePass function. */
106 
107 /** See llvm::createSCCPPass function. */
109 
110 /** See llvm::createSROAPass function. */
112 
113 /** See llvm::createSROAPass function. */
115 
116 /** See llvm::createSROAPass function. */
118  int Threshold);
119 
120 /** See llvm::createSimplifyLibCallsPass function. */
122 
123 /** See llvm::createTailCallEliminationPass function. */
125 
126 /** See llvm::createConstantPropagationPass function. */
128 
129 /** See llvm::demotePromoteMemoryToRegisterPass function. */
131 
132 /** See llvm::createVerifierPass function. */
134 
135 /** See llvm::createCorrelatedValuePropagationPass function */
137 
138 /** See llvm::createEarlyCSEPass function */
140 
141 /** See llvm::createEarlyCSEPass function */
143 
144 /** See llvm::createLowerExpectIntrinsicPass function */
146 
147 /** See llvm::createTypeBasedAliasAnalysisPass function */
149 
150 /** See llvm::createScopedNoAliasAAPass function */
152 
153 /** See llvm::createBasicAliasAnalysisPass function */
155 
156 /** See llvm::createUnifyFunctionExitNodesPass function */
158 
159 /**
160  * @}
161  */
162 
163 #ifdef __cplusplus
164 }
165 #endif /* defined(__cplusplus) */
166 
167 #endif
void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM)
See llvm::createJumpThreadingPass function.
Definition: Scalar.cpp:161
void LLVMAddGVNPass(LLVMPassManagerRef PM)
See llvm::createGVNPass function.
Definition: Scalar.cpp:145
void LLVMAddLICMPass(LLVMPassManagerRef PM)
See llvm::createLICMPass function.
Definition: Scalar.cpp:169
void LLVMAddSimplifyLibCallsPass(LLVMPassManagerRef PM)
See llvm::createSimplifyLibCallsPass function.
Definition: Scalar.cpp:234
void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM)
See llvm::createTypeBasedAliasAnalysisPass function.
Definition: Scalar.cpp:270
void LLVMAddEarlyCSEMemSSAPass(LLVMPassManagerRef PM)
See llvm::createEarlyCSEPass function.
Definition: Scalar.cpp:262
void LLVMAddReassociatePass(LLVMPassManagerRef PM)
See llvm::createReassociatePass function.
Definition: Scalar.cpp:213
void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM)
See llvm::createConstantPropagationPass function.
Definition: Scalar.cpp:242
void LLVMAddNewGVNPass(LLVMPassManagerRef PM)
See llvm::createGVNPass function.
Definition: Scalar.cpp:149
void LLVMAddLoopUnrollPass(LLVMPassManagerRef PM)
See llvm::createLoopUnrollPass function.
Definition: Scalar.cpp:189
void LLVMAddScalarizerPass(LLVMPassManagerRef PM)
See llvm::createScalarizerPass function.
Definition: Scalar.cpp:141
void LLVMAddScalarReplAggregatesPassSSA(LLVMPassManagerRef PM)
See llvm::createSROAPass function.
Definition: Scalar.cpp:225
void LLVMAddUnifyFunctionExitNodesPass(LLVMPassManagerRef PM)
See llvm::createUnifyFunctionExitNodesPass function.
Definition: Scalar.cpp:286
void LLVMAddMergedLoadStoreMotionPass(LLVMPassManagerRef PM)
See llvm::createMergedLoadStoreMotionPass function.
Definition: Scalar.cpp:153
void LLVMAddScopedNoAliasAAPass(LLVMPassManagerRef PM)
See llvm::createScopedNoAliasAAPass function.
Definition: Scalar.cpp:274
void LLVMAddLoopRerollPass(LLVMPassManagerRef PM)
See llvm::createLoopRerollPass function.
Definition: Scalar.cpp:185
void LLVMAddDeadStoreEliminationPass(LLVMPassManagerRef PM)
See llvm::createDeadStoreEliminationPass function.
Definition: Scalar.cpp:137
void LLVMAddAlignmentFromAssumptionsPass(LLVMPassManagerRef PM)
See llvm::createAlignmentFromAssumptionsPass function.
Definition: Scalar.cpp:129
void LLVMAddLoopRotatePass(LLVMPassManagerRef PM)
See llvm::createLoopRotatePass function.
Definition: Scalar.cpp:181
void LLVMAddScalarReplAggregatesPassWithThreshold(LLVMPassManagerRef PM, int Threshold)
See llvm::createSROAPass function.
Definition: Scalar.cpp:229
void LLVMAddLoopDeletionPass(LLVMPassManagerRef PM)
See llvm::createLoopDeletionPass function.
Definition: Scalar.cpp:173
void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM)
See llvm::createEarlyCSEPass function.
Definition: Scalar.cpp:258
void LLVMAddScalarReplAggregatesPass(LLVMPassManagerRef PM)
See llvm::createSROAPass function.
Definition: Scalar.cpp:221
void LLVMAddLoopIdiomPass(LLVMPassManagerRef PM)
See llvm::createLoopIdiomPass function.
Definition: Scalar.cpp:177
void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM)
See llvm::createInstructionCombiningPass function.
void LLVMAddSCCPPass(LLVMPassManagerRef PM)
See llvm::createSCCPPass function.
Definition: Scalar.cpp:217
void LLVMAddVerifierPass(LLVMPassManagerRef PM)
See llvm::createVerifierPass function.
Definition: Scalar.cpp:250
struct LLVMOpaquePassManager * LLVMPassManagerRef
Definition: Types.h:128
void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM)
See llvm::demotePromoteMemoryToRegisterPass function.
Definition: Scalar.cpp:246
static cl::opt< unsigned > Threshold("loop-unswitch-threshold", cl::desc("Max loop size to unswitch"), cl::init(100), cl::Hidden)
void LLVMAddLoopUnrollAndJamPass(LLVMPassManagerRef PM)
See llvm::createLoopUnrollAndJamPass function.
Definition: Scalar.cpp:193
void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM)
See llvm::createBasicAliasAnalysisPass function.
Definition: Scalar.cpp:278
void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM)
See llvm::createBitTrackingDCEPass function.
Definition: Scalar.cpp:125
void LLVMAddLowerAtomicPass(LLVMPassManagerRef PM)
See llvm::createLowerAtomicPass function.
Definition: Scalar.cpp:201
void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM)
See llvm::createCorrelatedValuePropagationPass function.
Definition: Scalar.cpp:254
void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM)
See llvm::createLowerExpectIntrinsicPass function.
Definition: Scalar.cpp:282
void LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM)
See llvm::createIndVarSimplifyPass function.
Definition: Scalar.cpp:157
void LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM)
See llvm::createTailCallEliminationPass function.
Definition: Scalar.cpp:238
void LLVMAddPartiallyInlineLibCallsPass(LLVMPassManagerRef PM)
See llvm::createPartiallyInlineLibCallsPass function.
Definition: Scalar.cpp:209
void LLVMAddLoopUnswitchPass(LLVMPassManagerRef PM)
See llvm::createLoopUnswitchPass function.
Definition: Scalar.cpp:197
void LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM)
See llvm::createCFGSimplificationPass function.
Definition: Scalar.cpp:133
void LLVMAddMemCpyOptPass(LLVMPassManagerRef PM)
See llvm::createMemCpyOptPass function.
Definition: Scalar.cpp:205
void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM)
See llvm::createAggressiveDCEPass function.
Definition: Scalar.cpp:121