[OCaml] Llvm_ipo: add missing transforms

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193945 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Peter Zotov 2013-11-03 07:54:08 +00:00
parent 208130f113
commit 630109d30c
4 changed files with 13 additions and 0 deletions

View File

@ -49,6 +49,12 @@ CAMLprim value llvm_add_function_inlining(LLVMPassManagerRef PM) {
return Val_unit;
}
/* [`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);

View File

@ -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 =

View File

@ -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"

View File

@ -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