[OCaml] Llvm_scalar_opts: add missing transforms
authorPeter Zotov <whitequark@whitequark.org>
Sun, 3 Nov 2013 07:54:17 +0000 (07:54 +0000)
committerPeter Zotov <whitequark@whitequark.org>
Sun, 3 Nov 2013 07:54:17 +0000 (07:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193946 91177308-0d34-0410-b5e6-96231b3b80d8

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 d856c0f..958939d 100644 (file)
@@ -109,3 +109,6 @@ external
 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 ea2e4a9..d69abe2 100644 (file)
@@ -162,3 +162,7 @@ external
 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 51e966c..0a71bd7 100644 (file)
@@ -199,3 +199,9 @@ CAMLprim value llvm_add_basic_alias_analysis(LLVMPassManagerRef PM) {
   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 506fdf0..8202e19 100644 (file)
@@ -75,6 +75,7 @@ let test_transforms () =
            ++ 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