[PATCH] OCaml bindings: Llvm_scalar_opts: add missing transforms
Peter Zotov
whitequark at whitequark.org
Sat Oct 12 09:37:09 PDT 2013
Hi sylvestre.ledru,
This commit ensures that the OCaml bindings for scalar transforms are up-to-date with the C API.
http://llvm-reviews.chandlerc.com/D1919
Files:
bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml
bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli
bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c
test/Bindings/Ocaml/scalar_opts.ml
Index: bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml
===================================================================
--- bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml
+++ bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml
@@ -109,3 +109,6 @@
add_basic_alias_analysis : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
= "llvm_add_basic_alias_analysis"
+external
+add_partially_inline_lib_calls : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
+ = "llvm_add_partially_inline_lib_calls"
Index: bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli
===================================================================
--- bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli
+++ bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli
@@ -162,3 +162,7 @@
add_basic_alias_analysis : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
= "llvm_add_basic_alias_analysis"
+(** See the [llvm::createPartiallyInlineLibCallsPass] function. *)
+external
+add_partially_inline_lib_calls : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
+ = "llvm_add_partially_inline_lib_calls"
Index: bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c
===================================================================
--- bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c
+++ bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c
@@ -199,3 +199,9 @@
LLVMAddBasicAliasAnalysisPass(PM);
return Val_unit;
}
+
+/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
+CAMLprim value llvm_add_partially_inline_lib_calls(LLVMPassManagerRef PM) {
+ LLVMAddPartiallyInlineLibCallsPass(PM);
+ return Val_unit;
+}
Index: test/Bindings/Ocaml/scalar_opts.ml
===================================================================
--- test/Bindings/Ocaml/scalar_opts.ml
+++ test/Bindings/Ocaml/scalar_opts.ml
@@ -75,6 +75,7 @@
++ add_lower_expect_intrinsic
++ add_type_based_alias_analysis
++ add_basic_alias_analysis
+ ++ add_partially_inline_lib_calls
++ add_verifier
++ PassManager.initialize
++ PassManager.run_function fn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1919.1.patch
Type: text/x-patch
Size: 2145 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131012/7ce1af42/attachment.bin>
More information about the llvm-commits
mailing list