1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
| (*===-- llvm_scalar_opts.mli - LLVM OCaml Interface -----------*- OCaml -*-===*
*
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
* See https://llvm.org/LICENSE.txt for license information.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*
*===----------------------------------------------------------------------===*)
(** Scalar Transforms.
This interface provides an OCaml API for LLVM scalar transforms, the
classes in the [LLVMScalarOpts] library. *)
(** See the [llvm::createAggressiveDCEPass] function. *)
external add_aggressive_dce
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_aggressive_dce"
(** See the [llvm::createDCEPass] function. *)
external add_dce
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_dce"
(** See the [llvm::createAlignmentFromAssumptionsPass] function. *)
external add_alignment_from_assumptions
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_alignment_from_assumptions"
(** See the [llvm::createCFGSimplificationPass] function. *)
external add_cfg_simplification
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_cfg_simplification"
(** See [llvm::createDeadStoreEliminationPass] function. *)
external add_dead_store_elimination
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_dead_store_elimination"
(** See [llvm::createScalarizerPass] function. *)
external add_scalarizer
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_scalarizer"
(** See [llvm::createMergedLoadStoreMotionPass] function. *)
external add_merged_load_store_motion
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_merged_load_store_motion"
(** See the [llvm::createGVNPass] function. *)
external add_gvn
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_gvn"
(** See the [llvm::createIndVarSimplifyPass] function. *)
external add_ind_var_simplification
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_ind_var_simplify"
(** See the [llvm::createInstructionCombiningPass] function. *)
external add_instruction_combination
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_instruction_combining"
(** See the [llvm::createJumpThreadingPass] function. *)
external add_jump_threading
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_jump_threading"
(** See the [llvm::createLICMPass] function. *)
external add_licm
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_licm"
(** See the [llvm::createLoopDeletionPass] function. *)
external add_loop_deletion
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_loop_deletion"
(** See the [llvm::createLoopIdiomPass] function. *)
external add_loop_idiom
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_loop_idiom"
(** See the [llvm::createLoopRotatePass] function. *)
external add_loop_rotation
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_loop_rotate"
(** See the [llvm::createLoopRerollPass] function. *)
external add_loop_reroll
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_loop_reroll"
(** See the [llvm::createLoopUnrollPass] function. *)
external add_loop_unroll
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_loop_unroll"
(** See the [llvm::createLoopUnswitchPass] function. *)
external add_loop_unswitch
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_loop_unswitch"
(** See the [llvm::createMemCpyOptPass] function. *)
external add_memcpy_opt
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_memcpy_opt"
(** See the [llvm::createPartiallyInlineLibCallsPass] function. *)
external add_partially_inline_lib_calls
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_partially_inline_lib_calls"
(** See the [llvm::createLowerAtomicPass] function. *)
external add_lower_atomic
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_lower_atomic"
(** See the [llvm::createLowerSwitchPass] function. *)
external add_lower_switch
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_lower_switch"
(** See the [llvm::createPromoteMemoryToRegisterPass] function. *)
external add_memory_to_register_promotion
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_promote_memory_to_register"
(** See the [llvm::createReassociatePass] function. *)
external add_reassociation
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_reassociation"
(** See the [llvm::createSCCPPass] function. *)
external add_sccp
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_sccp"
(** See the [llvm::createSROAPass] function. *)
external add_scalar_repl_aggregation
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_scalar_repl_aggregates"
(** See the [llvm::createSROAPass] function. *)
external add_scalar_repl_aggregation_ssa
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_scalar_repl_aggregates_ssa"
(** See the [llvm::createSROAPass] function. *)
external add_scalar_repl_aggregation_with_threshold
: int -> [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_scalar_repl_aggregates_with_threshold"
(** See the [llvm::createSimplifyLibCallsPass] function. *)
external add_lib_call_simplification
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_simplify_lib_calls"
(** See the [llvm::createTailCallEliminationPass] function. *)
external add_tail_call_elimination
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_tail_call_elimination"
(** See the [llvm::createConstantPropagationPass] function. *)
external add_constant_propagation
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_constant_propagation"
(** See the [llvm::createDemoteMemoryToRegisterPass] function. *)
external add_memory_to_register_demotion
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_demote_memory_to_register"
(** See the [llvm::createVerifierPass] function. *)
external add_verifier
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_verifier"
(** See the [llvm::createCorrelatedValuePropagationPass] function. *)
external add_correlated_value_propagation
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_correlated_value_propagation"
(** See the [llvm::createEarlyCSE] function. *)
external add_early_cse
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_early_cse"
(** See the [llvm::createLowerExpectIntrinsicPass] function. *)
external add_lower_expect_intrinsic
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_lower_expect_intrinsic"
(** See the [llvm::createLowerConstantIntrinsicsPass] function. *)
external add_lower_constant_intrinsics
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_lower_constant_intrinsics"
(** See the [llvm::createTypeBasedAliasAnalysisPass] function. *)
external add_type_based_alias_analysis
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_type_based_alias_analysis"
(** See the [llvm::createScopedNoAliasAAPass] function. *)
external add_scoped_no_alias_alias_analysis
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_scoped_no_alias_aa"
(** See the [llvm::createBasicAliasAnalysisPass] function. *)
external add_basic_alias_analysis
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_basic_alias_analysis"
(** See the [llvm::createUnifyFunctionExitNodesPass] function. *)
external add_unify_function_exit_nodes
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_unify_function_exit_nodes"
|