IRTransform

Trait IRTransform 

Source
pub trait IRTransform: Send + Sync {
    // Required methods
    fn transform(
        &mut self,
        ir: &mut IntermediateRepresentation,
    ) -> Result<(), IRError>;
    fn should_run(&self, level: OptimizationLevel) -> bool;
    fn name(&self) -> &str;
}
Expand description

IR transformation trait

Required Methods§

Source

fn transform( &mut self, ir: &mut IntermediateRepresentation, ) -> Result<(), IRError>

Apply transformation to IR

Source

fn should_run(&self, level: OptimizationLevel) -> bool

Check if pass should run at given optimization level

Source

fn name(&self) -> &str

Get pass name

Implementors§