[][src]Trait llhd::opt::prelude::Pass

pub trait Pass {
    fn run_on_module(ctx: &PassContext, module: &mut Module) -> bool { ... }
fn run_on_unit(ctx: &PassContext, data: &mut UnitBuilder<'_>) -> bool { ... }
fn run_on_cfg(ctx: &PassContext, unit: &mut UnitBuilder<'_>) -> bool { ... }
fn run_on_inst(
        ctx: &PassContext,
        inst: Inst,
        unit: &mut UnitBuilder<'_>
    ) -> bool { ... } }

An optimization pass.

The optimization infrastructure will always call run_on_module(). However, implementors of the trait should override the function at their desired level of granularity. The Pass trait provides a sane default for all run_*() functions.

Provided methods

fn run_on_module(ctx: &PassContext, module: &mut Module) -> bool

Run this pass on an entire module.

fn run_on_unit(ctx: &PassContext, data: &mut UnitBuilder<'_>) -> bool

Run this pass on an entire unit.

fn run_on_cfg(ctx: &PassContext, unit: &mut UnitBuilder<'_>) -> bool

Run this pass on an entire function or process.

fn run_on_inst(
    ctx: &PassContext,
    inst: Inst,
    unit: &mut UnitBuilder<'_>
) -> bool

Run this pass on an instruction.

Loading content...

Implementors

impl Pass for ConstFolding[src]

impl Pass for ControlFlowSimplification[src]

impl Pass for DeadCodeElim[src]

impl Pass for Desequentialization[src]

impl Pass for EarlyCodeMotion[src]

impl Pass for GlobalCommonSubexprElim[src]

impl Pass for InstSimplification[src]

impl Pass for ProcessLowering[src]

impl Pass for TemporalCodeMotion[src]

impl Pass for VarToPhiPromotion[src]

Loading content...