mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 05:32:25 +00:00
[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:
parent
208130f113
commit
630109d30c
@ -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);
|
||||
|
@ -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 =
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user