1 (*===-- llvm_passmgr_builder.mli - LLVM OCaml Interface -------*- OCaml -*-===*
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
7 *===----------------------------------------------------------------------===*)
9 (** Pass Manager Builder.
11 This interface provides an OCaml API for LLVM pass manager builder
12 from the [LLVMCore] library. *)
16 (** See the [llvm::PassManagerBuilder] function. *)
17 external create
: unit -> t
18 = "llvm_pmbuilder_create"
20 (** See the [llvm::PassManagerBuilder::OptLevel] function. *)
21 external set_opt_level
: int -> t
-> unit
22 = "llvm_pmbuilder_set_opt_level"
24 (** See the [llvm::PassManagerBuilder::SizeLevel] function. *)
25 external set_size_level
: int -> t
-> unit
26 = "llvm_pmbuilder_set_size_level"
28 (** See the [llvm::PassManagerBuilder::DisableUnitAtATime] function. *)
29 external set_disable_unit_at_a_time
: bool -> t
-> unit
30 = "llvm_pmbuilder_set_disable_unit_at_a_time"
32 (** See the [llvm::PassManagerBuilder::DisableUnrollLoops] function. *)
33 external set_disable_unroll_loops
: bool -> t
-> unit
34 = "llvm_pmbuilder_set_disable_unroll_loops"
36 (** See the [llvm::PassManagerBuilder::Inliner] function. *)
37 external use_inliner_with_threshold
: int -> t
-> unit
38 = "llvm_pmbuilder_use_inliner_with_threshold"
40 (** See the [llvm::PassManagerBuilder::populateFunctionPassManager] function. *)
41 external populate_function_pass_manager
42 : [ `Function
] Llvm.PassManager.t
-> t
-> unit
43 = "llvm_pmbuilder_populate_function_pass_manager"
45 (** See the [llvm::PassManagerBuilder::populateModulePassManager] function. *)
46 external populate_module_pass_manager
47 : [ `Module
] Llvm.PassManager.t
-> t
-> unit
48 = "llvm_pmbuilder_populate_module_pass_manager"
50 (** See the [llvm::PassManagerBuilder::populateLTOPassManager] function. *)
51 external populate_lto_pass_manager
52 : [ `Module
] Llvm.PassManager.t
-> internalize
:bool -> run_inliner
:bool -> t
-> unit
53 = "llvm_pmbuilder_populate_lto_pass_manager"