summaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2013-11-03 07:54:08 +0000
committerPeter Zotov <whitequark@whitequark.org>2013-11-03 07:54:08 +0000
commit630109d30c5808121957afce029c27952a90a72c (patch)
treeea57c156aef0c41a94f0516312d7be587aca375d /bindings
parent208130f11331eccab26c0a6f3146cd1891e53e33 (diff)
downloadexternal_llvm-630109d30c5808121957afce029c27952a90a72c.zip
external_llvm-630109d30c5808121957afce029c27952a90a72c.tar.gz
external_llvm-630109d30c5808121957afce029c27952a90a72c.tar.bz2
[OCaml] Llvm_ipo: add missing transforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193945 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r--bindings/ocaml/transforms/ipo/ipo_ocaml.c6
-rw-r--r--bindings/ocaml/transforms/ipo/llvm_ipo.ml2
-rw-r--r--bindings/ocaml/transforms/ipo/llvm_ipo.mli4
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"