1 (*===-- llvm_ipo.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 *===----------------------------------------------------------------------===*)
12 This interface provides an OCaml API for LLVM interprocedural optimizations, the
13 classes in the [LLVMIPO] library. *)
15 (** See the [llvm::createAddArgumentPromotionPass] function. *)
16 external add_argument_promotion
17 : [ `Module ] Llvm.PassManager.t -> unit
18 = "llvm_add_argument_promotion"
20 (** See the [llvm::createConstantMergePass] function. *)
21 external add_constant_merge
22 : [ `Module ] Llvm.PassManager.t -> unit
23 = "llvm_add_constant_merge"
25 (** See the [llvm::createDeadArgEliminationPass] function. *)
26 external add_dead_arg_elimination
27 : [ `Module ] Llvm.PassManager.t -> unit
28 = "llvm_add_dead_arg_elimination"
30 (** See the [llvm::createFunctionAttrsPass] function. *)
31 external add_function_attrs
32 : [ `Module ] Llvm.PassManager.t -> unit
33 = "llvm_add_function_attrs"
35 (** See the [llvm::createFunctionInliningPass] function. *)
36 external add_function_inlining
37 : [ `Module ] Llvm.PassManager.t -> unit
38 = "llvm_add_function_inlining"
40 (** See the [llvm::createAlwaysInlinerPass] function. *)
41 external add_always_inliner
42 : [ `Module ] Llvm.PassManager.t -> unit
43 = "llvm_add_always_inliner"
45 (** See the [llvm::createGlobalDCEPass] function. *)
46 external add_global_dce
47 : [ `Module ] Llvm.PassManager.t -> unit
48 = "llvm_add_global_dce"
50 (** See the [llvm::createGlobalOptimizerPass] function. *)
51 external add_global_optimizer
52 : [ `Module ] Llvm.PassManager.t -> unit
53 = "llvm_add_global_optimizer"
55 (** See the [llvm::createIPConstantPropagationPass] function. *)
56 external add_ipc_propagation
57 : [ `Module ] Llvm.PassManager.t -> unit
58 = "llvm_add_ip_constant_propagation"
60 (** See the [llvm::createPruneEHPass] function. *)
62 : [ `Module ] Llvm.PassManager.t -> unit
65 (** See the [llvm::createIPSCCPPass] function. *)
67 : [ `Module ] Llvm.PassManager.t -> unit
70 (** See the [llvm::createInternalizePass] function. *)
71 external add_internalize
72 : [ `Module ] Llvm.PassManager.t -> all_but_main:bool -> unit
73 = "llvm_add_internalize"
75 (** See the [llvm::createStripDeadPrototypesPass] function. *)
76 external add_strip_dead_prototypes
77 : [ `Module ] Llvm.PassManager.t -> unit
78 = "llvm_add_strip_dead_prototypes"
80 (** See the [llvm::createStripSymbolsPass] function. *)
81 external add_strip_symbols
82 : [ `Module ] Llvm.PassManager.t -> unit
83 = "llvm_add_strip_symbols"