From 630109d30c5808121957afce029c27952a90a72c Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Sun, 3 Nov 2013 07:54:08 +0000 Subject: [OCaml] Llvm_ipo: add missing transforms git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193945 91177308-0d34-0410-b5e6-96231b3b80d8 --- bindings/ocaml/transforms/ipo/ipo_ocaml.c | 6 ++++++ bindings/ocaml/transforms/ipo/llvm_ipo.ml | 2 ++ bindings/ocaml/transforms/ipo/llvm_ipo.mli | 4 ++++ 3 files changed, 12 insertions(+) (limited to 'bindings') diff --git a/bindings/ocaml/transforms/ipo/ipo_ocaml.c b/bindings/ocaml/transforms/ipo/ipo_ocaml.c index 496dc15..4ad8afb 100644 --- a/bindings/ocaml/transforms/ipo/ipo_ocaml.c +++ b/bindings/ocaml/transforms/ipo/ipo_ocaml.c @@ -50,6 +50,12 @@ CAMLprim value llvm_add_function_inlining(LLVMPassManagerRef PM) { } /* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_always_inliner(LLVMPassManagerRef PM) { + LLVMAddAlwaysInlinerPass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ CAMLprim value llvm_add_always_inliner_pass(LLVMPassManagerRef PM) { LLVMAddAlwaysInlinerPass(PM); return Val_unit; diff --git a/bindings/ocaml/transforms/ipo/llvm_ipo.ml b/bindings/ocaml/transforms/ipo/llvm_ipo.ml index e895c7a..93f564a 100644 --- a/bindings/ocaml/transforms/ipo/llvm_ipo.ml +++ b/bindings/ocaml/transforms/ipo/llvm_ipo.ml @@ -17,6 +17,8 @@ external add_function_attrs : [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_function_attrs" external add_function_inlining : [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_function_inlining" +external add_always_inliner : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_always_inliner" external add_global_dce : [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_global_dce" external add_global_optimizer : [ | `Module ] Llvm.PassManager.t -> unit = diff --git a/bindings/ocaml/transforms/ipo/llvm_ipo.mli b/bindings/ocaml/transforms/ipo/llvm_ipo.mli index 68f7c0e..1944c30 100644 --- a/bindings/ocaml/transforms/ipo/llvm_ipo.mli +++ b/bindings/ocaml/transforms/ipo/llvm_ipo.mli @@ -32,6 +32,10 @@ external add_function_attrs : [ | `Module ] Llvm.PassManager.t -> unit = external add_function_inlining : [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_function_inlining" +(** See llvm::createAlwaysInlinerPass function. *) +external add_always_inliner : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_always_inliner" + (** See llvm::createGlobalDCEPass function. *) external add_global_dce : [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_global_dce" -- cgit v1.1