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
25extern "C" {
26#endif
27
28/**
29 * @defgroup LLVMCTransformsScalar Scalar transformations
30 * @ingroup LLVMCTransforms
31 *
32 * @{
33 */
34
35/** See llvm::createAggressiveDCEPass function. */
36void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM);
37
38/** See llvm::createBitTrackingDCEPass function. */
39void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM);
40
41/** See llvm::createAlignmentFromAssumptionsPass function. */
42void LLVMAddAlignmentFromAssumptionsPass(LLVMPassManagerRef PM);
43
44/** See llvm::createCFGSimplificationPass function. */
45void LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM);
46
47/** See llvm::createDeadStoreEliminationPass function. */
48void LLVMAddDeadStoreEliminationPass(LLVMPassManagerRef PM);
49
50/** See llvm::createScalarizerPass function. */
51void LLVMAddScalarizerPass(LLVMPassManagerRef PM);
52
53/** See llvm::createMergedLoadStoreMotionPass function. */
54void LLVMAddMergedLoadStoreMotionPass(LLVMPassManagerRef PM);
55
56/** See llvm::createGVNPass function. */
57void LLVMAddGVNPass(LLVMPassManagerRef PM);
58
59/** See llvm::createGVNPass function. */
60void LLVMAddNewGVNPass(LLVMPassManagerRef PM);
61
62/** See llvm::createIndVarSimplifyPass function. */
63void LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM);
64
65/** See llvm::createInstructionCombiningPass function. */
66void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM);
67
68/** See llvm::createJumpThreadingPass function. */
69void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM);
70
71/** See llvm::createLICMPass function. */
72void LLVMAddLICMPass(LLVMPassManagerRef PM);
73
74/** See llvm::createLoopDeletionPass function. */
75void LLVMAddLoopDeletionPass(LLVMPassManagerRef PM);
76
77/** See llvm::createLoopIdiomPass function */
78void LLVMAddLoopIdiomPass(LLVMPassManagerRef PM);
79
80/** See llvm::createLoopRotatePass function. */
81void LLVMAddLoopRotatePass(LLVMPassManagerRef PM);
82
83/** See llvm::createLoopRerollPass function. */
84void LLVMAddLoopRerollPass(LLVMPassManagerRef PM);
85
86/** See llvm::createLoopUnrollPass function. */
87void LLVMAddLoopUnrollPass(LLVMPassManagerRef PM);
88
89/** See llvm::createLoopUnrollAndJamPass function. */
90void LLVMAddLoopUnrollAndJamPass(LLVMPassManagerRef PM);
91
92/** See llvm::createLoopUnswitchPass function. */
93void LLVMAddLoopUnswitchPass(LLVMPassManagerRef PM);
94
95/** See llvm::createLowerAtomicPass function. */
96void LLVMAddLowerAtomicPass(LLVMPassManagerRef PM);
97
98/** See llvm::createMemCpyOptPass function. */
99void LLVMAddMemCpyOptPass(LLVMPassManagerRef PM);
100
101/** See llvm::createPartiallyInlineLibCallsPass function. */
102void LLVMAddPartiallyInlineLibCallsPass(LLVMPassManagerRef PM);
103
104/** See llvm::createReassociatePass function. */
105void LLVMAddReassociatePass(LLVMPassManagerRef PM);
106
107/** See llvm::createSCCPPass function. */
108void LLVMAddSCCPPass(LLVMPassManagerRef PM);
109
110/** See llvm::createSROAPass function. */
111void LLVMAddScalarReplAggregatesPass(LLVMPassManagerRef PM);
112
113/** See llvm::createSROAPass function. */
114void LLVMAddScalarReplAggregatesPassSSA(LLVMPassManagerRef PM);
115
116/** See llvm::createSROAPass function. */
117void LLVMAddScalarReplAggregatesPassWithThreshold(LLVMPassManagerRef PM,
118 int Threshold);
119
120/** See llvm::createSimplifyLibCallsPass function. */
121void LLVMAddSimplifyLibCallsPass(LLVMPassManagerRef PM);
122
123/** See llvm::createTailCallEliminationPass function. */
124void LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM);
125
126/** See llvm::createConstantPropagationPass function. */
127void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM);
128
129/** See llvm::demotePromoteMemoryToRegisterPass function. */
130void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM);
131
132/** See llvm::createVerifierPass function. */
133void LLVMAddVerifierPass(LLVMPassManagerRef PM);
134
135/** See llvm::createCorrelatedValuePropagationPass function */
136void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM);
137
138/** See llvm::createEarlyCSEPass function */
139void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM);
140
141/** See llvm::createEarlyCSEPass function */
142void LLVMAddEarlyCSEMemSSAPass(LLVMPassManagerRef PM);
143
144/** See llvm::createLowerExpectIntrinsicPass function */
145void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM);
146
147/** See llvm::createTypeBasedAliasAnalysisPass function */
148void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM);
149
150/** See llvm::createScopedNoAliasAAPass function */
151void LLVMAddScopedNoAliasAAPass(LLVMPassManagerRef PM);
152
153/** See llvm::createBasicAliasAnalysisPass function */
154void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM);
155
156/** See llvm::createUnifyFunctionExitNodesPass function */
157void LLVMAddUnifyFunctionExitNodesPass(LLVMPassManagerRef PM);
158
159/**
160 * @}
161 */
162
163#ifdef __cplusplus
164}
165#endif /* defined(__cplusplus) */
166
167#endif
168