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::createInstructionCombiningPass] function. *)
21 external add_instruction_combining
: [<Llvm.PassManager.any
] Llvm.PassManager.t
23 = "llvm_add_instruction_combining"
25 (** See the [llvm::createPromoteMemoryToRegisterPass] function. *)
27 add_memory_to_register_promotion
: [<Llvm.PassManager.any
] Llvm.PassManager.t
29 = "llvm_add_memory_to_register_promotion"
31 (** See the [llvm::createDemoteMemoryToRegisterPass] function. *)
33 add_memory_to_register_demotion
: [<Llvm.PassManager.any
] Llvm.PassManager.t
35 = "llvm_add_memory_to_register_demotion"
37 (** See the [llvm::createReassociatePass] function. *)
38 external add_reassociation
: [<Llvm.PassManager.any
] Llvm.PassManager.t
40 = "llvm_add_reassociation"
42 (** See the [llvm::createGVNPass] function. *)
43 external add_gvn
: [<Llvm.PassManager.any
] Llvm.PassManager.t
47 (** See the [llvm::createCFGSimplificationPass] function. *)
48 external add_cfg_simplification
: [<Llvm.PassManager.any
] Llvm.PassManager.t
50 = "llvm_add_cfg_simplification"