diff options
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/ocaml/transforms/ipo/ipo_ocaml.c | 6 | ||||
-rw-r--r-- | bindings/ocaml/transforms/ipo/llvm_ipo.ml | 2 | ||||
-rw-r--r-- | bindings/ocaml/transforms/ipo/llvm_ipo.mli | 4 |
3 files changed, 12 insertions, 0 deletions
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" |