llvm-project/llvm/bindings/ocaml/transforms/passmgr_builder/llvm_passmgr_builder.mli
raw symbols SCIP| 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 | |
| 14 | type t |
| 15 | |
| 16 | (** See the [llvm::PassManagerBuilder] function. *) |
| 17 | external create : unit -> t |
| 18 | = "llvm_pmbuilder_create" |
| 19 | |
| 20 | (** See the [llvm::PassManagerBuilder::OptLevel] function. *) |
| 21 | external set_opt_level : int -> t -> unit |
| 22 | = "llvm_pmbuilder_set_opt_level" |
| 23 | |
| 24 | (** See the [llvm::PassManagerBuilder::SizeLevel] function. *) |
| 25 | external set_size_level : int -> t -> unit |
| 26 | = "llvm_pmbuilder_set_size_level" |
| 27 | |
| 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" |
| 31 | |
| 32 | (** See the [llvm::PassManagerBuilder::DisableUnrollLoops] function. *) |
| 33 | external set_disable_unroll_loops : bool -> t -> unit |
| 34 | = "llvm_pmbuilder_set_disable_unroll_loops" |
| 35 | |
| 36 | (** See the [llvm::PassManagerBuilder::Inliner] function. *) |
| 37 | external use_inliner_with_threshold : int -> t -> unit |
| 38 | = "llvm_pmbuilder_use_inliner_with_threshold" |
| 39 | |
| 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" |
| 44 | |
| 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" |