1(*===-- llvm_passmgr_builder.mli - LLVM OCaml Interface -------*- OCaml -*-===* 2 * 3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 * See https://llvm.org/LICENSE.txt for license information. 5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 * 7 *===----------------------------------------------------------------------===*) 8 9(** Pass Manager Builder. 10 11 This interface provides an OCaml API for LLVM pass manager builder 12 from the [LLVMCore] library. *) 13 14type t 15 16(** See the [llvm::PassManagerBuilder] function. *) 17external create : unit -> t 18 = "llvm_pmbuilder_create" 19 20(** See the [llvm::PassManagerBuilder::OptLevel] function. *) 21external set_opt_level : int -> t -> unit 22 = "llvm_pmbuilder_set_opt_level" 23 24(** See the [llvm::PassManagerBuilder::SizeLevel] function. *) 25external set_size_level : int -> t -> unit 26 = "llvm_pmbuilder_set_size_level" 27 28(** See the [llvm::PassManagerBuilder::DisableUnitAtATime] function. *) 29external set_disable_unit_at_a_time : bool -> t -> unit 30 = "llvm_pmbuilder_set_disable_unit_at_a_time" 31 32(** See the [llvm::PassManagerBuilder::DisableUnrollLoops] function. *) 33external set_disable_unroll_loops : bool -> t -> unit 34 = "llvm_pmbuilder_set_disable_unroll_loops" 35 36(** See the [llvm::PassManagerBuilder::Inliner] function. *) 37external use_inliner_with_threshold : int -> t -> unit 38 = "llvm_pmbuilder_use_inliner_with_threshold" 39 40(** See the [llvm::PassManagerBuilder::populateFunctionPassManager] function. *) 41external populate_function_pass_manager 42 : [ `Function ] Llvm.PassManager.t -> t -> unit 43 = "llvm_pmbuilder_populate_function_pass_manager" 44 45(** See the [llvm::PassManagerBuilder::populateModulePassManager] function. *) 46external populate_module_pass_manager 47 : [ `Module ] Llvm.PassManager.t -> t -> unit 48 = "llvm_pmbuilder_populate_module_pass_manager" 49 50(** See the [llvm::PassManagerBuilder::populateLTOPassManager] function. *) 51external populate_lto_pass_manager 52 : [ `Module ] Llvm.PassManager.t -> internalize:bool -> run_inliner:bool -> t -> unit 53 = "llvm_pmbuilder_populate_lto_pass_manager" 54