From: Peter Zotov Date: Sun, 3 Nov 2013 07:54:17 +0000 (+0000) Subject: [OCaml] Llvm_scalar_opts: add missing transforms X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=30288ac4020138a09ae2a0e4c989b1003340150b;p=oota-llvm.git [OCaml] Llvm_scalar_opts: add missing transforms git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193946 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml b/bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml index d856c0f1b2c..958939dc3f3 100644 --- a/bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml +++ b/bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml @@ -109,3 +109,6 @@ external add_basic_alias_analysis : [ unit = "llvm_add_basic_alias_analysis" +external +add_partially_inline_lib_calls : [ unit + = "llvm_add_partially_inline_lib_calls" diff --git a/bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli b/bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli index ea2e4a9113c..d69abe209c4 100644 --- a/bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli +++ b/bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli @@ -162,3 +162,7 @@ external add_basic_alias_analysis : [ unit = "llvm_add_basic_alias_analysis" +(** See the [llvm::createPartiallyInlineLibCallsPass] function. *) +external +add_partially_inline_lib_calls : [ unit + = "llvm_add_partially_inline_lib_calls" diff --git a/bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c b/bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c index 51e966c3376..0a71bd7cad2 100644 --- a/bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c +++ b/bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c @@ -199,3 +199,9 @@ CAMLprim value llvm_add_basic_alias_analysis(LLVMPassManagerRef PM) { LLVMAddBasicAliasAnalysisPass(PM); return Val_unit; } + +/* [ unit */ +CAMLprim value llvm_add_partially_inline_lib_calls(LLVMPassManagerRef PM) { + LLVMAddPartiallyInlineLibCallsPass(PM); + return Val_unit; +} diff --git a/test/Bindings/Ocaml/scalar_opts.ml b/test/Bindings/Ocaml/scalar_opts.ml index 506fdf0b720..8202e1907d8 100644 --- a/test/Bindings/Ocaml/scalar_opts.ml +++ b/test/Bindings/Ocaml/scalar_opts.ml @@ -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