/// Convert an instruction input to a producing instruction's output if possible (in same BB), or a
/// register otherwise.
Convert an instruction input to a producing instruction's output if possible (in same BB), or a
register otherwise.
Convert an instruction input to a producing instruction ' s output if possible ( in same BB ) or a register otherwise .
fn input_source<C: LowerCtx<Inst>>(ctx: &mut C, input: InsnInput) -> InsnInputSource {
    if let Some((input_inst, result_num)) = ctx.input_inst(input.insn, input.input) {
        let out = InsnOutput {
            insn: input_inst,
            output: result_num,
        };
        InsnInputSource::Output(out)
    } else {
        let reg = ctx.input(input.insn, input.input);
        InsnInputSource::Reg(reg)
    }
}
fn input_source < C : LowerCtx < Inst > > ( ctx : & mut C , input : InsnInput ) -> InsnInputSource { if let Some ( ( input_inst , result_num ) ) = ctx . input_inst ( input . insn , input . input ) { let out = InsnOutput { insn : input_inst , output : result_num , } ; InsnInputSource :: Output ( out ) } else { let reg = ctx . input ( input . insn , input . input ) ; InsnInputSource :: Reg ( reg ) } }
Convert an instruction input to a producing instruction's output if possible (in same BB), or a
register otherwise.
Convert an instruction input to a producing instruction ' s output if possible ( in same BB ) or a register otherwise .
ctx
&mut C
input
InsnInput