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