[llvm] r193945 - [OCaml] Llvm_ipo: add missing transforms
Peter Zotov
whitequark at whitequark.org
Sun Nov 3 00:54:08 PDT 2013
Author: whitequark
Date: Sun Nov 3 01:54:08 2013
New Revision: 193945
URL: http://llvm.org/viewvc/llvm-project?rev=193945&view=rev
Log:
[OCaml] Llvm_ipo: add missing transforms
Modified:
llvm/trunk/bindings/ocaml/transforms/ipo/ipo_ocaml.c
llvm/trunk/bindings/ocaml/transforms/ipo/llvm_ipo.ml
llvm/trunk/bindings/ocaml/transforms/ipo/llvm_ipo.mli
llvm/trunk/test/Bindings/Ocaml/ipo_opts.ml
Modified: llvm/trunk/bindings/ocaml/transforms/ipo/ipo_ocaml.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/transforms/ipo/ipo_ocaml.c?rev=193945&r1=193944&r2=193945&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/transforms/ipo/ipo_ocaml.c (original)
+++ llvm/trunk/bindings/ocaml/transforms/ipo/ipo_ocaml.c Sun Nov 3 01:54:08 2013
@@ -50,6 +50,12 @@ CAMLprim value llvm_add_function_inlinin
}
/* [`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;
Modified: llvm/trunk/bindings/ocaml/transforms/ipo/llvm_ipo.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/transforms/ipo/llvm_ipo.ml?rev=193945&r1=193944&r2=193945&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/transforms/ipo/llvm_ipo.ml (original)
+++ llvm/trunk/bindings/ocaml/transforms/ipo/llvm_ipo.ml Sun Nov 3 01:54:08 2013
@@ -17,6 +17,8 @@ external add_function_attrs : [ | `Modul
"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 =
Modified: llvm/trunk/bindings/ocaml/transforms/ipo/llvm_ipo.mli
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/transforms/ipo/llvm_ipo.mli?rev=193945&r1=193944&r2=193945&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/transforms/ipo/llvm_ipo.mli (original)
+++ llvm/trunk/bindings/ocaml/transforms/ipo/llvm_ipo.mli Sun Nov 3 01:54:08 2013
@@ -32,6 +32,10 @@ external add_function_attrs : [ | `Modul
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"
Modified: llvm/trunk/test/Bindings/Ocaml/ipo_opts.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/ipo_opts.ml?rev=193945&r1=193944&r2=193945&view=diff
==============================================================================
--- llvm/trunk/test/Bindings/Ocaml/ipo_opts.ml (original)
+++ llvm/trunk/test/Bindings/Ocaml/ipo_opts.ml Sun Nov 3 01:54:08 2013
@@ -55,6 +55,7 @@ let test_transforms () =
++ add_dead_arg_elimination
++ add_function_attrs
++ add_function_inlining
+ ++ add_always_inliner
++ add_global_dce
++ add_global_optimizer
++ add_ipc_propagation
More information about the llvm-commits
mailing list