}
/* [`Module] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_always_inliner_pass(LLVMPassManagerRef PM) {
- LLVMAddAlwaysInlinerPass(PM);
- return Val_unit;
-}
-
-/* [`Module] Llvm.PassManager.t -> unit */
CAMLprim value llvm_add_global_dce(LLVMPassManagerRef PM) {
LLVMAddGlobalDCEPass(PM);
return Val_unit;
}
/* [`Module] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_ipc_propagation(LLVMPassManagerRef PM) {
+CAMLprim value llvm_add_ip_constant_propagation(LLVMPassManagerRef PM) {
LLVMAddIPConstantPropagationPass(PM);
return Val_unit;
}
return Val_unit;
}
-/* [`Module] Llvm.PassManager.t -> bool -> unit */
+/* [`Module] Llvm.PassManager.t -> all_but_main:bool -> unit */
CAMLprim value llvm_add_internalize(LLVMPassManagerRef PM, value AllButMain) {
LLVMAddInternalizePass(PM, Bool_val(AllButMain));
return Val_unit;
*
*===----------------------------------------------------------------------===*)
-external add_argument_promotion : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_argument_promotion"
-external add_constant_merge : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_constant_merge"
-external add_dead_arg_elimination :
- [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_dead_arg_elimination"
-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 =
- "llvm_add_global_optimizer"
-external add_ipc_propagation : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_ipc_propagation"
-external add_prune_eh : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_prune_eh"
-external add_ipsccp : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_ipsccp"
-external add_internalize : [ | `Module ] Llvm.PassManager.t -> bool -> unit =
- "llvm_add_internalize"
-external add_strip_dead_prototypes :
- [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_strip_dead_prototypes"
-external add_strip_symbols : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_strip_symbols"
+external add_argument_promotion
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_argument_promotion"
+external add_constant_merge
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_constant_merge"
+external add_dead_arg_elimination
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_dead_arg_elimination"
+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
+ = "llvm_add_global_optimizer"
+external add_ipc_propagation
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_ip_constant_propagation"
+external add_prune_eh
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_prune_eh"
+external add_ipsccp
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_ipsccp"
+external add_internalize
+ : [ `Module ] Llvm.PassManager.t -> all_but_main:bool -> unit
+ = "llvm_add_internalize"
+external add_strip_dead_prototypes
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_strip_dead_prototypes"
+external add_strip_symbols
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_strip_symbols"
This interface provides an OCaml API for LLVM interprocedural optimizations, the
classes in the [LLVMIPO] library. *)
-(** See llvm::createAddArgumentPromotionPass *)
-external add_argument_promotion : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_argument_promotion"
-
-(** See llvm::createConstantMergePass function. *)
-external add_constant_merge : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_constant_merge"
-
-(** See llvm::createDeadArgEliminationPass function. *)
-external add_dead_arg_elimination :
- [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_dead_arg_elimination"
-
-(** See llvm::createFunctionAttrsPass function. *)
-external add_function_attrs : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_function_attrs"
-
-(** See llvm::createFunctionInliningPass function. *)
-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"
-
-(** See llvm::createGlobalOptimizerPass function. *)
-external add_global_optimizer : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_global_optimizer"
-
-(** See llvm::createIPConstantPropagationPass function. *)
-external add_ipc_propagation : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_ipc_propagation"
-
-(** See llvm::createPruneEHPass function. *)
-external add_prune_eh : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_prune_eh"
-
-(** See llvm::createIPSCCPPass function. *)
-external add_ipsccp : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_ipsccp"
-
-(** See llvm::createInternalizePass function. *)
-external add_internalize : [ | `Module ] Llvm.PassManager.t -> bool -> unit =
- "llvm_add_internalize"
-
-(** See llvm::createStripDeadPrototypesPass function. *)
-external add_strip_dead_prototypes :
- [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_strip_dead_prototypes"
-
-(** See llvm::createStripSymbolsPass function. *)
-external add_strip_symbols : [ | `Module ] Llvm.PassManager.t -> unit =
- "llvm_add_strip_symbols"
+(** See the [llvm::createAddArgumentPromotionPass] function. *)
+external add_argument_promotion
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_argument_promotion"
+
+(** See the [llvm::createConstantMergePass] function. *)
+external add_constant_merge
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_constant_merge"
+
+(** See the [llvm::createDeadArgEliminationPass] function. *)
+external add_dead_arg_elimination
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_dead_arg_elimination"
+
+(** See the [llvm::createFunctionAttrsPass] function. *)
+external add_function_attrs
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_function_attrs"
+
+(** See the [llvm::createFunctionInliningPass] function. *)
+external add_function_inlining
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_function_inlining"
+
+(** See the [llvm::createAlwaysInlinerPass] function. *)
+external add_always_inliner
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_always_inliner"
+
+(** See the [llvm::createGlobalDCEPass] function. *)
+external add_global_dce
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_global_dce"
+
+(** See the [llvm::createGlobalOptimizerPass] function. *)
+external add_global_optimizer
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_global_optimizer"
+
+(** See the [llvm::createIPConstantPropagationPass] function. *)
+external add_ipc_propagation
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_ip_constant_propagation"
+
+(** See the [llvm::createPruneEHPass] function. *)
+external add_prune_eh
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_prune_eh"
+
+(** See the [llvm::createIPSCCPPass] function. *)
+external add_ipsccp
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_ipsccp"
+
+(** See the [llvm::createInternalizePass] function. *)
+external add_internalize
+ : [ `Module ] Llvm.PassManager.t -> all_but_main:bool -> unit
+ = "llvm_add_internalize"
+
+(** See the [llvm::createStripDeadPrototypesPass] function. *)
+external add_strip_dead_prototypes
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_strip_dead_prototypes"
+
+(** See the [llvm::createStripSymbolsPass] function. *)
+external add_strip_symbols
+ : [ `Module ] Llvm.PassManager.t -> unit
+ = "llvm_add_strip_symbols"
type t
-(** See [llvm::PassManagerBuilder]. *)
+(** See the [llvm::PassManagerBuilder] function. *)
external create : unit -> t
= "llvm_pmbuilder_create"
-(** See [llvm::PassManagerBuilder::OptLevel]. *)
+(** See the [llvm::PassManagerBuilder::OptLevel] function. *)
external set_opt_level : int -> t -> unit
= "llvm_pmbuilder_set_opt_level"
-(** See [llvm::PassManagerBuilder::SizeLevel]. *)
+(** See the [llvm::PassManagerBuilder::SizeLevel] function. *)
external set_size_level : int -> t -> unit
= "llvm_pmbuilder_set_size_level"
-(** See [llvm::PassManagerBuilder::DisableUnitAtATime]. *)
+(** See the [llvm::PassManagerBuilder::DisableUnitAtATime] function. *)
external set_disable_unit_at_a_time : bool -> t -> unit
= "llvm_pmbuilder_set_disable_unit_at_a_time"
-(** See [llvm::PassManagerBuilder::DisableUnrollLoops]. *)
+(** See the [llvm::PassManagerBuilder::DisableUnrollLoops] function. *)
external set_disable_unroll_loops : bool -> t -> unit
= "llvm_pmbuilder_set_disable_unroll_loops"
-(** See [llvm::PassManagerBuilder::Inliner]. *)
+(** See the [llvm::PassManagerBuilder::Inliner] function. *)
external use_inliner_with_threshold : int -> t -> unit
= "llvm_pmbuilder_use_inliner_with_threshold"
-(** See [llvm::PassManagerBuilder::populateFunctionPassManager]. *)
+(** See the [llvm::PassManagerBuilder::populateFunctionPassManager] function. *)
external populate_function_pass_manager
: [ `Function ] Llvm.PassManager.t -> t -> unit
= "llvm_pmbuilder_populate_function_pass_manager"
-(** See [llvm::PassManagerBuilder::populateModulePassManager]. *)
+(** See the [llvm::PassManagerBuilder::populateModulePassManager] function. *)
external populate_module_pass_manager
: [ `Module ] Llvm.PassManager.t -> t -> unit
= "llvm_pmbuilder_populate_module_pass_manager"
-(** See [llvm::PassManagerBuilder::populateLTOPassManager]. *)
+(** See the [llvm::PassManagerBuilder::populateLTOPassManager] function. *)
external populate_lto_pass_manager
: [ `Module ] Llvm.PassManager.t -> internalize:bool -> run_inliner:bool -> t -> unit
- = "llvm_pmbuilder_populate_lto_pass_manager"
\ No newline at end of file
+ = "llvm_pmbuilder_populate_lto_pass_manager"
-(*===-- llvm_scalar_opts.ml - LLVM OCaml Interface -------------*- OCaml -*-===*
+(*===-- llvm_scalar_opts.ml - LLVM OCaml Interface ------------*- OCaml -*-===*
*
* The LLVM Compiler Infrastructure
*
*
*===----------------------------------------------------------------------===*)
-external add_constant_propagation : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_constant_propagation"
-external add_sccp : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_sccp"
-external add_dead_store_elimination : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_dead_store_elimination"
-external add_aggressive_dce : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_aggressive_dce"
-external
-add_scalar_repl_aggregation : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_scalar_repl_aggregation"
-
-external
-add_scalar_repl_aggregation_ssa : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_scalar_repl_aggregation_ssa"
-
-external
-add_scalar_repl_aggregation_with_threshold : int -> [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_scalar_repl_aggregation_with_threshold"
-external add_ind_var_simplification : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_ind_var_simplification"
-external
-add_instruction_combination : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_instruction_combination"
-external add_licm : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_licm"
-external add_loop_unswitch : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_loop_unswitch"
-external add_loop_unroll : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_loop_unroll"
-external add_loop_rotation : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_loop_rotation"
-external
-add_memory_to_register_promotion : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_memory_to_register_promotion"
-external
-add_memory_to_register_demotion : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_memory_to_register_demotion"
-external add_reassociation : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_reassociation"
-external add_jump_threading : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_jump_threading"
-external add_cfg_simplification : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_cfg_simplification"
-external
-add_tail_call_elimination : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_tail_call_elimination"
-external add_gvn : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_gvn"
-external add_memcpy_opt : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_memcpy_opt"
-external add_loop_deletion : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_loop_deletion"
-
-external add_loop_idiom : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_loop_idiom"
-
-external
-add_lib_call_simplification : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_lib_call_simplification"
-
-external
-add_verifier : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_verifier"
-
-external
-add_correlated_value_propagation : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_correlated_value_propagation"
-
-external
-add_early_cse : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_early_cse"
-
-external
-add_lower_expect_intrinsic : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_lower_expect_intrinsic"
-
-external
-add_type_based_alias_analysis : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_type_based_alias_analysis"
-
-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"
+external add_aggressive_dce
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_aggressive_dce"
+external add_alignment_from_assumptions
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_alignment_from_assumptions"
+external add_cfg_simplification
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_cfg_simplification"
+external add_dead_store_elimination
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_dead_store_elimination"
+external add_scalarizer
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_scalarizer"
+external add_merged_load_store_motion
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_merged_load_store_motion"
+external add_gvn
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_gvn"
+external add_ind_var_simplification
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_ind_var_simplify"
+external add_instruction_combination
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_instruction_combining"
+external add_jump_threading
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_jump_threading"
+external add_licm
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_licm"
+external add_loop_deletion
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_deletion"
+external add_loop_idiom
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_idiom"
+external add_loop_rotation
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_rotate"
+external add_loop_reroll
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_reroll"
+external add_loop_unroll
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_unroll"
+external add_loop_unswitch
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_unswitch"
+external add_memcpy_opt
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_memcpy_opt"
+external add_partially_inline_lib_calls
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_partially_inline_lib_calls"
+external add_lower_switch
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_lower_switch"
+external add_memory_to_register_promotion
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_promote_memory_to_register"
+external add_reassociation
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_reassociation"
+external add_sccp
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_sccp"
+external add_scalar_repl_aggregation
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_scalar_repl_aggregates"
+external add_scalar_repl_aggregation_ssa
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_scalar_repl_aggregates_ssa"
+external add_scalar_repl_aggregation_with_threshold
+ : int -> [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_scalar_repl_aggregates_with_threshold"
+external add_lib_call_simplification
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_simplify_lib_calls"
+external add_tail_call_elimination
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_tail_call_elimination"
+external add_constant_propagation
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_constant_propagation"
+external add_memory_to_register_demotion
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_demote_memory_to_register"
+external add_verifier
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_verifier"
+external add_correlated_value_propagation
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_correlated_value_propagation"
+external add_early_cse
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_early_cse"
+external add_lower_expect_intrinsic
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_lower_expect_intrinsic"
+external add_type_based_alias_analysis
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_type_based_alias_analysis"
+external add_scoped_no_alias_alias_analysis
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_scoped_no_alias_aa"
+external add_basic_alias_analysis
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_basic_alias_analysis"
-(*===-- llvm_scalar_opts.mli - LLVM OCaml Interface ------------*- OCaml -*-===*
+(*===-- llvm_scalar_opts.mli - LLVM OCaml Interface -----------*- OCaml -*-===*
*
* The LLVM Compiler Infrastructure
*
This interface provides an OCaml API for LLVM scalar transforms, the
classes in the [LLVMScalarOpts] library. *)
-(** See the [llvm::createConstantPropagationPass] function. *)
-external add_constant_propagation : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_constant_propagation"
+(** See the [llvm::createAggressiveDCEPass] function. *)
+external add_aggressive_dce
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_aggressive_dce"
-(** See the [llvm::createSCCPPass] function. *)
-external add_sccp : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_sccp"
+(** See the [llvm::createAlignmentFromAssumptionsPass] function. *)
+external add_alignment_from_assumptions
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_alignment_from_assumptions"
+
+(** See the [llvm::createCFGSimplificationPass] function. *)
+external add_cfg_simplification
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_cfg_simplification"
(** See [llvm::createDeadStoreEliminationPass] function. *)
-external add_dead_store_elimination : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_dead_store_elimination"
+external add_dead_store_elimination
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_dead_store_elimination"
-(** See The [llvm::createAggressiveDCEPass] function. *)
-external add_aggressive_dce : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_aggressive_dce"
+(** See [llvm::createScalarizerPass] function. *)
+external add_scalarizer
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_scalarizer"
-(** See the [llvm::createScalarReplAggregatesPass] function. *)
-external
-add_scalar_repl_aggregation : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_scalar_repl_aggregation"
+(** See [llvm::createMergedLoadStoreMotionPass] function. *)
+external add_merged_load_store_motion
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_merged_load_store_motion"
-(** See the [llvm::createScalarReplAggregatesPassSSA] function. *)
-external
-add_scalar_repl_aggregation_ssa : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_scalar_repl_aggregation_ssa"
-
-(** See the [llvm::createScalarReplAggregatesWithThreshold] function. *)
-external
-add_scalar_repl_aggregation_with_threshold : int -> [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_scalar_repl_aggregation_with_threshold"
+(** See the [llvm::createGVNPass] function. *)
+external add_gvn
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_gvn"
(** See the [llvm::createIndVarSimplifyPass] function. *)
-external add_ind_var_simplification : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_ind_var_simplification"
+external add_ind_var_simplification
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_ind_var_simplify"
(** See the [llvm::createInstructionCombiningPass] function. *)
-external
-add_instruction_combination : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_instruction_combination"
+external add_instruction_combination
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_instruction_combining"
+
+(** See the [llvm::createJumpThreadingPass] function. *)
+external add_jump_threading
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_jump_threading"
(** See the [llvm::createLICMPass] function. *)
-external add_licm : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_licm"
+external add_licm
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_licm"
-(** See the [llvm::createLoopUnswitchPass] function. *)
-external add_loop_unswitch : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_loop_unswitch"
+(** See the [llvm::createLoopDeletionPass] function. *)
+external add_loop_deletion
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_deletion"
-(** See the [llvm::createLoopUnrollPass] function. *)
-external add_loop_unroll : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_loop_unroll"
+(** See the [llvm::createLoopIdiomPass] function. *)
+external add_loop_idiom
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_idiom"
(** See the [llvm::createLoopRotatePass] function. *)
-external add_loop_rotation : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_loop_rotation"
+external add_loop_rotation
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_rotate"
-(** See the [llvm::createPromoteMemoryToRegisterPass] function. *)
-external
-add_memory_to_register_promotion : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_memory_to_register_promotion"
+(** See the [llvm::createLoopRerollPass] function. *)
+external add_loop_reroll
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_reroll"
-(** See the [llvm::createDemoteMemoryToRegisterPass] function. *)
-external
-add_memory_to_register_demotion : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_memory_to_register_demotion"
+(** See the [llvm::createLoopUnrollPass] function. *)
+external add_loop_unroll
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_unroll"
-(** See the [llvm::createReassociatePass] function. *)
-external add_reassociation : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_reassociation"
+(** See the [llvm::createLoopUnswitchPass] function. *)
+external add_loop_unswitch
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_unswitch"
-(** See the [llvm::createJumpThreadingPass] function. *)
-external add_jump_threading : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_jump_threading"
+(** See the [llvm::createMemCpyOptPass] function. *)
+external add_memcpy_opt
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_memcpy_opt"
-(** See the [llvm::createCFGSimplificationPass] function. *)
-external add_cfg_simplification : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_cfg_simplification"
+(** See the [llvm::createPartiallyInlineLibCallsPass] function. *)
+external add_partially_inline_lib_calls
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_partially_inline_lib_calls"
-(** See the [llvm::createTailCallEliminationPass] function. *)
-external
-add_tail_call_elimination : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_tail_call_elimination"
+(** See the [llvm::createLowerSwitchPass] function. *)
+external add_lower_switch
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_lower_switch"
-(** See the [llvm::createGVNPass] function. *)
-external add_gvn : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_gvn"
+(** See the [llvm::createPromoteMemoryToRegisterPass] function. *)
+external add_memory_to_register_promotion
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_promote_memory_to_register"
-(** See the [llvm::createMemCpyOptPass] function. *)
-external add_memcpy_opt : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_memcpy_opt"
+(** See the [llvm::createReassociatePass] function. *)
+external add_reassociation
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_reassociation"
-(** See the [llvm::createLoopDeletionPass] function. *)
-external add_loop_deletion : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_loop_deletion"
+(** See the [llvm::createSCCPPass] function. *)
+external add_sccp
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_sccp"
+
+(** See the [llvm::createScalarReplAggregatesPass] function. *)
+external add_scalar_repl_aggregation
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_scalar_repl_aggregates"
+
+(** See the [llvm::createScalarReplAggregatesPassSSA] function. *)
+external add_scalar_repl_aggregation_ssa
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_scalar_repl_aggregates_ssa"
-external add_loop_idiom : [<Llvm.PassManager.any] Llvm.PassManager.t
- -> unit
- = "llvm_add_loop_idiom"
+(** See the [llvm::createScalarReplAggregatesWithThreshold] function. *)
+external add_scalar_repl_aggregation_with_threshold
+ : int -> [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_scalar_repl_aggregates_with_threshold"
(** See the [llvm::createSimplifyLibCallsPass] function. *)
-external
-add_lib_call_simplification : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_lib_call_simplification"
+external add_lib_call_simplification
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_simplify_lib_calls"
+
+(** See the [llvm::createTailCallEliminationPass] function. *)
+external add_tail_call_elimination
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_tail_call_elimination"
+
+(** See the [llvm::createConstantPropagationPass] function. *)
+external add_constant_propagation
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_constant_propagation"
+
+(** See the [llvm::createDemoteMemoryToRegisterPass] function. *)
+external add_memory_to_register_demotion
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_demote_memory_to_register"
(** See the [llvm::createVerifierPass] function. *)
-external
-add_verifier : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_verifier"
+external add_verifier
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_verifier"
(** See the [llvm::createCorrelatedValuePropagationPass] function. *)
-external
-add_correlated_value_propagation : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_correlated_value_propagation"
+external add_correlated_value_propagation
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_correlated_value_propagation"
(** See the [llvm::createEarlyCSE] function. *)
-external
-add_early_cse : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_early_cse"
+external add_early_cse
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_early_cse"
(** See the [llvm::createLowerExpectIntrinsicPass] function. *)
-external
-add_lower_expect_intrinsic : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_lower_expect_intrinsic"
+external add_lower_expect_intrinsic
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_lower_expect_intrinsic"
(** See the [llvm::createTypeBasedAliasAnalysisPass] function. *)
-external
-add_type_based_alias_analysis : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_type_based_alias_analysis"
+external add_type_based_alias_analysis
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_type_based_alias_analysis"
-(** See the [llvm::createBasicAliasAnalysisPass] function. *)
-external
-add_basic_alias_analysis : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_basic_alias_analysis"
+(** See the [llvm::createScopedNoAliasAAPass] function. *)
+external add_scoped_no_alias_alias_analysis
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_scoped_no_alias_aa"
-(** See the [llvm::createPartiallyInlineLibCallsPass] function. *)
-external
-add_partially_inline_lib_calls : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_partially_inline_lib_calls"
+(** See the [llvm::createBasicAliasAnalysisPass] function. *)
+external add_basic_alias_analysis
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_basic_alias_analysis"
#include "caml/misc.h"
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_constant_propagation(LLVMPassManagerRef PM) {
- LLVMAddConstantPropagationPass(PM);
+CAMLprim value llvm_add_aggressive_dce(LLVMPassManagerRef PM) {
+ LLVMAddAggressiveDCEPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_sccp(LLVMPassManagerRef PM) {
- LLVMAddSCCPPass(PM);
+CAMLprim value llvm_add_alignment_from_assumptions(LLVMPassManagerRef PM) {
+ LLVMAddAlignmentFromAssumptionsPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_dead_store_elimination(LLVMPassManagerRef PM) {
- LLVMAddDeadStoreEliminationPass(PM);
+CAMLprim value llvm_add_cfg_simplification(LLVMPassManagerRef PM) {
+ LLVMAddCFGSimplificationPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_aggressive_dce(LLVMPassManagerRef PM) {
- LLVMAddAggressiveDCEPass(PM);
+CAMLprim value llvm_add_dead_store_elimination(LLVMPassManagerRef PM) {
+ LLVMAddDeadStoreEliminationPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_scalar_repl_aggregation(LLVMPassManagerRef PM) {
- LLVMAddScalarReplAggregatesPass(PM);
+CAMLprim value llvm_add_scalarizer(LLVMPassManagerRef PM) {
+ LLVMAddScalarizerPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_scalar_repl_aggregation_ssa(LLVMPassManagerRef PM) {
- LLVMAddScalarReplAggregatesPassSSA(PM);
+CAMLprim value llvm_add_merged_load_store_motion(LLVMPassManagerRef PM) {
+ LLVMAddMergedLoadStoreMotionPass(PM);
return Val_unit;
}
-/* [<Llvm.PassManager.any] Llvm.PassManager.t -> int -> unit */
-CAMLprim value llvm_add_scalar_repl_aggregation_with_threshold(value threshold,
- LLVMPassManagerRef PM) {
- LLVMAddScalarReplAggregatesPassWithThreshold(PM, Int_val(threshold));
+/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
+CAMLprim value llvm_add_gvn(LLVMPassManagerRef PM) {
+ LLVMAddGVNPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_ind_var_simplification(LLVMPassManagerRef PM) {
+CAMLprim value llvm_add_ind_var_simplify(LLVMPassManagerRef PM) {
LLVMAddIndVarSimplifyPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_instruction_combination(LLVMPassManagerRef PM) {
+CAMLprim value llvm_add_instruction_combining(LLVMPassManagerRef PM) {
LLVMAddInstructionCombiningPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
+CAMLprim value llvm_add_jump_threading(LLVMPassManagerRef PM) {
+ LLVMAddJumpThreadingPass(PM);
+ return Val_unit;
+}
+
+/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
CAMLprim value llvm_add_licm(LLVMPassManagerRef PM) {
LLVMAddLICMPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_loop_unswitch(LLVMPassManagerRef PM) {
- LLVMAddLoopUnswitchPass(PM);
+CAMLprim value llvm_add_loop_deletion(LLVMPassManagerRef PM) {
+ LLVMAddLoopDeletionPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_loop_unroll(LLVMPassManagerRef PM) {
- LLVMAddLoopUnrollPass(PM);
+CAMLprim value llvm_add_loop_idiom(LLVMPassManagerRef PM) {
+ LLVMAddLoopIdiomPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_loop_rotation(LLVMPassManagerRef PM) {
+CAMLprim value llvm_add_loop_rotate(LLVMPassManagerRef PM) {
LLVMAddLoopRotatePass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_memory_to_register_promotion(LLVMPassManagerRef PM) {
- LLVMAddPromoteMemoryToRegisterPass(PM);
+CAMLprim value llvm_add_loop_reroll(LLVMPassManagerRef PM) {
+ LLVMAddLoopRerollPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_memory_to_register_demotion(LLVMPassManagerRef PM) {
- LLVMAddDemoteMemoryToRegisterPass(PM);
+CAMLprim value llvm_add_loop_unroll(LLVMPassManagerRef PM) {
+ LLVMAddLoopUnrollPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_reassociation(LLVMPassManagerRef PM) {
- LLVMAddReassociatePass(PM);
+CAMLprim value llvm_add_loop_unswitch(LLVMPassManagerRef PM) {
+ LLVMAddLoopUnswitchPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_jump_threading(LLVMPassManagerRef PM) {
- LLVMAddJumpThreadingPass(PM);
+CAMLprim value llvm_add_memcpy_opt(LLVMPassManagerRef PM) {
+ LLVMAddMemCpyOptPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_cfg_simplification(LLVMPassManagerRef PM) {
- LLVMAddCFGSimplificationPass(PM);
+CAMLprim value llvm_add_partially_inline_lib_calls(LLVMPassManagerRef PM) {
+ LLVMAddPartiallyInlineLibCallsPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_tail_call_elimination(LLVMPassManagerRef PM) {
- LLVMAddTailCallEliminationPass(PM);
+CAMLprim value llvm_add_lower_switch(LLVMPassManagerRef PM) {
+ LLVMAddLowerSwitchPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_merged_load_store_motion(LLVMPassManagerRef PM) {
- LLVMAddMergedLoadStoreMotionPass(PM);
+CAMLprim value llvm_add_promote_memory_to_register(LLVMPassManagerRef PM) {
+ LLVMAddPromoteMemoryToRegisterPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_gvn(LLVMPassManagerRef PM) {
- LLVMAddGVNPass(PM);
+CAMLprim value llvm_add_reassociation(LLVMPassManagerRef PM) {
+ LLVMAddReassociatePass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_memcpy_opt(LLVMPassManagerRef PM) {
- LLVMAddMemCpyOptPass(PM);
+CAMLprim value llvm_add_sccp(LLVMPassManagerRef PM) {
+ LLVMAddSCCPPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_loop_deletion(LLVMPassManagerRef PM) {
- LLVMAddLoopDeletionPass(PM);
+CAMLprim value llvm_add_scalar_repl_aggregates(LLVMPassManagerRef PM) {
+ LLVMAddScalarReplAggregatesPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_loop_idiom(LLVMPassManagerRef PM) {
- LLVMAddLoopIdiomPass(PM);
+CAMLprim value llvm_add_scalar_repl_aggregates_ssa(LLVMPassManagerRef PM) {
+ LLVMAddScalarReplAggregatesPassSSA(PM);
+ return Val_unit;
+}
+
+/* int -> [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
+CAMLprim value llvm_add_scalar_repl_aggregates_with_threshold(value threshold,
+ LLVMPassManagerRef PM) {
+ LLVMAddScalarReplAggregatesPassWithThreshold(PM, Int_val(threshold));
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_lib_call_simplification(LLVMPassManagerRef PM) {
+CAMLprim value llvm_add_simplify_lib_calls(LLVMPassManagerRef PM) {
LLVMAddSimplifyLibCallsPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
+CAMLprim value llvm_add_tail_call_elimination(LLVMPassManagerRef PM) {
+ LLVMAddTailCallEliminationPass(PM);
+ return Val_unit;
+}
+
+/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
+CAMLprim value llvm_add_constant_propagation(LLVMPassManagerRef PM) {
+ LLVMAddConstantPropagationPass(PM);
+ return Val_unit;
+}
+
+/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
+CAMLprim value llvm_add_demote_memory_to_register(LLVMPassManagerRef PM) {
+ LLVMAddDemoteMemoryToRegisterPass(PM);
+ return Val_unit;
+}
+
+/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
CAMLprim value llvm_add_verifier(LLVMPassManagerRef PM) {
LLVMAddVerifierPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_basic_alias_analysis(LLVMPassManagerRef PM) {
- LLVMAddBasicAliasAnalysisPass(PM);
+CAMLprim value llvm_add_scoped_no_alias_aa(LLVMPassManagerRef PM) {
+ LLVMAddScopedNoAliasAAPass(PM);
return Val_unit;
}
/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
-CAMLprim value llvm_add_partially_inline_lib_calls(LLVMPassManagerRef PM) {
- LLVMAddPartiallyInlineLibCallsPass(PM);
+CAMLprim value llvm_add_basic_alias_analysis(LLVMPassManagerRef PM) {
+ LLVMAddBasicAliasAnalysisPass(PM);
return Val_unit;
}
*
*===----------------------------------------------------------------------===*)
-external add_bb_vectorize : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_bb_vectorize"
-external add_loop_vectorize : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_loop_vectorize"
-external add_slp_vectorize : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_slp_vectorize"
+external add_bb_vectorize
+ : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
+ = "llvm_add_bb_vectorize"
+external add_loop_vectorize
+ : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_vectorize"
+external add_slp_vectorize
+ : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
+ = "llvm_add_slp_vectorize"
classes in the [LLVMVectorize] library. *)
(** See the [llvm::createBBVectorizePass] function. *)
-external add_bb_vectorize : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_bb_vectorize"
+external add_bb_vectorize
+ : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
+ = "llvm_add_bb_vectorize"
(** See the [llvm::createLoopVectorizePass] function. *)
-external add_loop_vectorize : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_loop_vectorize"
+external add_loop_vectorize
+ : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
+ = "llvm_add_loop_vectorize"
-(** See [llvm::createSLPVectorizerPass] function. *)
-external add_slp_vectorize : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
- = "llvm_add_slp_vectorize"
+(** See the [llvm::createSLPVectorizerPass] function. *)
+external add_slp_vectorize
+ : [<Llvm.PassManager.any] Llvm.PassManager.t -> unit
+ = "llvm_add_slp_vectorize"
(*===-- Transforms --------------------------------------------------------===*)
let test_transforms () =
- let (++) x f = ignore (f x); x in
+ let (++) x f = f x; x in
let fty = function_type i8_type [| |] in
let fn = define_function "fn" fty m in
++ add_ipc_propagation
++ add_prune_eh
++ add_ipsccp
- ++ add_internalize
+ ++ add_internalize ~all_but_main:true
++ add_strip_dead_prototypes
++ add_strip_symbols
++ PassManager.run_module m
(*===-- Transforms --------------------------------------------------------===*)
let test_transforms () =
- let (++) x f = ignore (f x); x in
+ let (++) x f = f x; x in
let fty = function_type void_type [| |] in
let fn = define_function "fn" fty m in
ignore (build_ret_void (builder_at_end context (entry_block fn)));
ignore (PassManager.create_function m
- ++ add_verifier
- ++ add_constant_propagation
- ++ add_sccp
- ++ add_dead_store_elimination
++ add_aggressive_dce
- ++ add_scalar_repl_aggregation
- ++ add_scalar_repl_aggregation_ssa
- ++ add_scalar_repl_aggregation_with_threshold 4
+ ++ add_alignment_from_assumptions
+ ++ add_cfg_simplification
+ ++ add_dead_store_elimination
+ ++ add_scalarizer
+ ++ add_merged_load_store_motion
+ ++ add_gvn
++ add_ind_var_simplification
++ add_instruction_combination
+ ++ add_jump_threading
++ add_licm
- ++ add_loop_unswitch
- ++ add_loop_unroll
+ ++ add_loop_deletion
+ ++ add_loop_idiom
++ add_loop_rotation
+ ++ add_loop_reroll
+ ++ add_loop_unroll
+ ++ add_loop_unswitch
+ ++ add_memcpy_opt
+ ++ add_partially_inline_lib_calls
+ ++ add_lower_switch
++ add_memory_to_register_promotion
- ++ add_memory_to_register_demotion
++ add_reassociation
- ++ add_jump_threading
- ++ add_cfg_simplification
- ++ add_tail_call_elimination
- ++ add_gvn
- ++ add_memcpy_opt
- ++ add_loop_deletion
- ++ add_loop_idiom
+ ++ add_sccp
+ ++ add_scalar_repl_aggregation
+ ++ add_scalar_repl_aggregation_ssa
+ ++ add_scalar_repl_aggregation_with_threshold 4
++ add_lib_call_simplification
+ ++ add_tail_call_elimination
+ ++ add_constant_propagation
+ ++ add_memory_to_register_demotion
+ ++ add_verifier
++ add_correlated_value_propagation
++ add_early_cse
++ add_lower_expect_intrinsic
++ add_type_based_alias_analysis
+ ++ add_scoped_no_alias_alias_analysis
++ add_basic_alias_analysis
- ++ add_partially_inline_lib_calls
- ++ add_verifier
++ PassManager.initialize
++ PassManager.run_function fn
++ PassManager.finalize
(*===-- Transforms --------------------------------------------------------===*)
let test_transforms () =
- let (++) x f = ignore (f x); x in
+ let (++) x f = f x; x in
let fty = function_type void_type [| |] in
let fn = define_function "fn" fty m in