[][src]Trait cranelift_codegen::machinst::lower::LowerBackend

pub trait LowerBackend {
    type MInst: VCodeInst;
    fn lower<C: LowerCtx<I = Self::MInst>>(&self, ctx: &mut C, inst: Inst);
fn lower_branch_group<C: LowerCtx<I = Self::MInst>>(
        &self,
        ctx: &mut C,
        insts: &[Inst],
        targets: &[BlockIndex],
        fallthrough: Option<BlockIndex>
    ); }

A machine backend.

Associated Types

type MInst: VCodeInst

The machine instruction type.

Loading content...

Required methods

fn lower<C: LowerCtx<I = Self::MInst>>(&self, ctx: &mut C, inst: Inst)

Lower a single instruction. Instructions are lowered in reverse order. This function need not handle branches; those are always passed to lower_branch_group below.

fn lower_branch_group<C: LowerCtx<I = Self::MInst>>(
    &self,
    ctx: &mut C,
    insts: &[Inst],
    targets: &[BlockIndex],
    fallthrough: Option<BlockIndex>
)

Lower a block-terminating group of branches (which together can be seen as one N-way branch), given a vcode BlockIndex for each target.

Loading content...

Implementors

Loading content...