Expand description
Safe Rust wrapper for LLVM’s new PassManager.
Provides ModulePassManager and FunctionPassManager for running optimization
passes on LLVM modules and functions using the new PassBuilder-based infrastructure
(LLVM 10+).
§Example
ⓘ
use inkwell::context::Context;
use llvm_pm::{ModulePassManager, OptLevel};
let context = Context::create();
let module = context.create_module("my_module");
let mut pm = ModulePassManager::with_opt_level(None, OptLevel::O2, None)
.expect("Failed to create pass manager");
pm.run(&module).expect("Pass execution failed");Re-exports§
pub extern crate inkwell_05 as inkwell;
Modules§
- traits
- This module defines traits to define Pass or Analysis.
Structs§
- Cgscc
Analysis Manager - Analysis manager handle for CGSCC passes and analyses.
- Error
- Error type for pass manager operations.
- Function
Analysis Manager - Function
Pass Manager - A configured LLVM function pass manager using the new PassManager infrastructure.
- Loop
Analysis Manager - Analysis manager handle for loop passes and analyses.
- Module
Analysis Manager - Module
Pass Manager - A configured LLVM module pass manager using the new PassManager infrastructure.
- Options
- Builder for pass manager options.
Enums§
- OptLevel
- Optimization level for the default pass pipeline.