Skip to main content

Pass

Trait Pass 

Source
pub trait Pass: Debug {
    // Required methods
    fn name(&self) -> &str;
    fn run(&self, module: &mut Module) -> bool;
}
Expand description

An optimization pass that transforms an IR module.

Required Methods§

Source

fn name(&self) -> &str

Human-readable name of the pass.

Source

fn run(&self, module: &mut Module) -> bool

Run the pass on a module. Returns true if anything was modified.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§