1 (*===-- llvm_scalar_opts.mli - LLVM Ocaml Interface ------------*- OCaml -*-===*
3 * The LLVM Compiler Infrastructure
5 * This file is distributed under the University of Illinois Open Source
6 * License. See LICENSE.TXT for details.
8 *===----------------------------------------------------------------------===*)
10 (** Scalar Transforms.
12 This interface provides an ocaml API for LLVM scalar transforms, the
13 classes in the [LLVMScalarOpts] library. *)
15 (** See the [llvm::createConstantPropogationPass] function. *)
16 external add_constant_propagation
: [<Llvm.PassManager.any
] Llvm.PassManager.t
18 = "llvm_add_constant_propagation"
20 (** See the [llvm::createSCCPPass] function. *)
21 external add_sccp
: [<Llvm.PassManager.any
] Llvm.PassManager.t
-> unit
24 (** See [llvm::createDeadStoreEliminationPass] function. *)
25 external add_dead_store_elimination
: [<Llvm.PassManager.any
] Llvm.PassManager.t
27 = "llvm_add_dead_store_elimination"
29 (** See The [llvm::createAggressiveDCEPass] function. *)
30 external add_aggressive_dce
: [<Llvm.PassManager.any
] Llvm.PassManager.t
-> unit
31 = "llvm_add_aggressive_dce"
33 (** See the [llvm::createScalarReplAggregatesPass] function. *)
35 add_scalar_repl_aggregation
: [<Llvm.PassManager.any
] Llvm.PassManager.t
-> unit
36 = "llvm_add_scalar_repl_aggregation"
38 (** See the [llvm::createIndVarSimplifyPass] function. *)
39 external add_ind_var_simplification
: [<Llvm.PassManager.any
] Llvm.PassManager.t
41 = "llvm_add_ind_var_simplification"
43 (** See the [llvm::createInstructionCombiningPass] function. *)
45 add_instruction_combination
: [<Llvm.PassManager.any
] Llvm.PassManager.t
47 = "llvm_add_instruction_combination"
49 (** See the [llvm::createLICMPass] function. *)
50 external add_licm
: [<Llvm.PassManager.any
] Llvm.PassManager.t
54 (** See the [llvm::createLoopUnswitchPass] function. *)
55 external add_loop_unswitch
: [<Llvm.PassManager.any
] Llvm.PassManager.t
57 = "llvm_add_loop_unswitch"
59 (** See the [llvm::createLoopUnrollPass] function. *)
60 external add_loop_unroll
: [<Llvm.PassManager.any
] Llvm.PassManager.t
62 = "llvm_add_loop_unroll"
64 (** See the [llvm::createLoopRotatePass] function. *)
65 external add_loop_rotation
: [<Llvm.PassManager.any
] Llvm.PassManager.t
67 = "llvm_add_loop_rotation"
69 (** See the [llvm::createPromoteMemoryToRegisterPass] function. *)
71 add_memory_to_register_promotion
: [<Llvm.PassManager.any
] Llvm.PassManager.t
73 = "llvm_add_memory_to_register_promotion"
75 (** See the [llvm::createDemoteMemoryToRegisterPass] function. *)
77 add_memory_to_register_demotion
: [<Llvm.PassManager.any
] Llvm.PassManager.t
79 = "llvm_add_memory_to_register_demotion"
81 (** See the [llvm::createReassociatePass] function. *)
82 external add_reassociation
: [<Llvm.PassManager.any
] Llvm.PassManager.t
-> unit
83 = "llvm_add_reassociation"
85 (** See the [llvm::createJumpThreadingPass] function. *)
86 external add_jump_threading
: [<Llvm.PassManager.any
] Llvm.PassManager.t
88 = "llvm_add_jump_threading"
90 (** See the [llvm::createCFGSimplificationPass] function. *)
91 external add_cfg_simplification
: [<Llvm.PassManager.any
] Llvm.PassManager.t
93 = "llvm_add_cfg_simplification"
95 (** See the [llvm::createTailCallEliminationPass] function. *)
97 add_tail_call_elimination
: [<Llvm.PassManager.any
] Llvm.PassManager.t
-> unit
98 = "llvm_add_tail_call_elimination"
100 (** See the [llvm::createGVNPass] function. *)
101 external add_gvn
: [<Llvm.PassManager.any
] Llvm.PassManager.t
105 (** See the [llvm::createMemCpyOptPass] function. *)
106 external add_memcpy_opt
: [<Llvm.PassManager.any
] Llvm.PassManager.t
108 = "llvm_add_memcpy_opt"
110 (** See the [llvm::createLoopDeletionPass] function. *)
111 external add_loop_deletion
: [<Llvm.PassManager.any
] Llvm.PassManager.t
113 = "llvm_add_loop_deletion"
115 (** See the [llvm::createSimplifyLibCallsPass] function. *)
117 add_lib_call_simplification
: [<Llvm.PassManager.any
] Llvm.PassManager.t
-> unit
118 = "llvm_add_lib_call_simplification"