package llvm
val create : unit -> [ `Module ] t
PassManager.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
.
PassManager.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
.
run_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 -> bool
initialize 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.
run_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 -> bool
finalize 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.