Home | History | Annotate | Download | only in ipo
      1 (*===-- llvm_ipo.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 (** IPO Transforms.
     11 
     12     This interface provides an OCaml API for LLVM interprocedural optimizations, the
     13     classes in the [LLVMIPO] library. *)
     14 
     15 (** See llvm::createAddArgumentPromotionPass *)
     16 external add_argument_promotion : [ | `Module ] Llvm.PassManager.t -> unit =
     17   "llvm_add_argument_promotion"
     18 
     19 (** See llvm::createConstantMergePass function. *)
     20 external add_constant_merge : [ | `Module ] Llvm.PassManager.t -> unit =
     21   "llvm_add_constant_merge"
     22 
     23 (**  See llvm::createDeadArgEliminationPass function. *)
     24 external add_dead_arg_elimination :
     25   [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_dead_arg_elimination"
     26 
     27 (**  See llvm::createFunctionAttrsPass function. *)
     28 external add_function_attrs : [ | `Module ] Llvm.PassManager.t -> unit =
     29   "llvm_add_function_attrs"
     30 
     31 (**  See llvm::createFunctionInliningPass function. *)
     32 external add_function_inlining : [ | `Module ] Llvm.PassManager.t -> unit =
     33   "llvm_add_function_inlining"
     34 
     35 (**  See llvm::createAlwaysInlinerPass function. *)
     36 external add_always_inliner : [ | `Module ] Llvm.PassManager.t -> unit =
     37   "llvm_add_always_inliner"
     38 
     39 (**  See llvm::createGlobalDCEPass function. *)
     40 external add_global_dce : [ | `Module ] Llvm.PassManager.t -> unit =
     41   "llvm_add_global_dce"
     42 
     43 (**  See llvm::createGlobalOptimizerPass function. *)
     44 external add_global_optimizer : [ | `Module ] Llvm.PassManager.t -> unit =
     45   "llvm_add_global_optimizer"
     46 
     47 (**  See llvm::createIPConstantPropagationPass function. *)
     48 external add_ipc_propagation : [ | `Module ] Llvm.PassManager.t -> unit =
     49   "llvm_add_ipc_propagation"
     50 
     51 (**  See llvm::createPruneEHPass function. *)
     52 external add_prune_eh : [ | `Module ] Llvm.PassManager.t -> unit =
     53   "llvm_add_prune_eh"
     54 
     55 (**  See llvm::createIPSCCPPass function. *)
     56 external add_ipsccp : [ | `Module ] Llvm.PassManager.t -> unit =
     57   "llvm_add_ipsccp"
     58 
     59 (**  See llvm::createInternalizePass function. *)
     60 external add_internalize : [ | `Module ] Llvm.PassManager.t -> bool -> unit =
     61   "llvm_add_internalize"
     62 
     63 (**  See llvm::createStripDeadPrototypesPass function. *)
     64 external add_strip_dead_prototypes :
     65   [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_strip_dead_prototypes"
     66 
     67 (**  See llvm::createStripSymbolsPass function. *)
     68 external add_strip_symbols : [ | `Module ] Llvm.PassManager.t -> unit =
     69   "llvm_add_strip_symbols"
     70