module PassManager:sig..end
type 'a t
typeany =[ `Function | `Module ]
val create : unit -> [ `Module ] tPassManager.create () constructs a new whole-module pass pipeline. This
type of pipeline is suitable for link-time optimization and whole-module
transformations.
See the constructor of llvm::PassManager.
val create_function : Llvm.llmodule -> [ `Function ] tPassManager.create_function m constructs a new function-by-function
pass pipeline over the module m. It does not take ownership of m.
This type of pipeline is suitable for code generation and JIT compilation
tasks.
See the constructor of llvm::FunctionPassManager.
val run_module : Llvm.llmodule -> [ `Module ] t -> boolrun_module m pm initializes, executes on the module m, and finalizes
all of the passes scheduled in the pass manager pm. Returns true if
any of the passes modified the module, false otherwise.
See the llvm::PassManager::run method.
val initialize : [ `Function ] t -> boolinitialize fpm initializes all of the function passes scheduled in the
function pass manager fpm. Returns true if any of the passes modified
the module, false otherwise.
See the llvm::FunctionPassManager::doInitialization method.
val run_function : Llvm.llvalue -> [ `Function ] t -> boolrun_function f fpm executes all of the function passes scheduled in the
function pass manager fpm over the function f. Returns true if any
of the passes modified f, false otherwise.
See the llvm::FunctionPassManager::run method.
val finalize : [ `Function ] t -> boolfinalize fpm finalizes all of the function passes scheduled in the
function pass manager fpm. Returns true if any of the passes
modified the module, false otherwise.
See the llvm::FunctionPassManager::doFinalization method.
val dispose : [< any ] t -> unitFrees the memory of a pass pipeline. For function pipelines, does not free
the module.
See the destructor of llvm::BasePassManager.