Skip to main content

Crate llvm_pm

Crate llvm_pm 

Source
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§

CgsccAnalysisManager
Analysis manager handle for CGSCC passes and analyses.
Error
Error type for pass manager operations.
FunctionAnalysisManager
FunctionPassManager
A configured LLVM function pass manager using the new PassManager infrastructure.
LoopAnalysisManager
Analysis manager handle for loop passes and analyses.
ModuleAnalysisManager
ModulePassManager
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.

Type Aliases§

AnalysisKey
LLVMBasicBlockRef
LLVMModuleRef
LLVMValueRef