pub fn copy_propagation(
        target: &FunctionTarget<'_>,
        code: Vec<Bytecode>,
        defs: &ReachingDefAnnotation,
    ) -> Vec<Bytecode> {
        let mut res = vec![];
        for (pc, bytecode) in code.into_iter().enumerate() {
            let no_defs = BTreeMap::new();
            let reaching_defs = defs.0.get(&(pc as CodeOffset)).unwrap_or(&no_defs);
            let mut propagate = |local| Self::get_propagated_local(local, reaching_defs);
            res.push(bytecode.remap_src_vars(target, &mut propagate));
        }
        res
    }
/// Perform copy propagation based on reaching definitions analysis results.
Perform copy propagation based on reaching definitions analysis results.
Perform copy propagation based on reaching definitions analysis results .
pub fn copy_propagation(
        target: &FunctionTarget<'_>,
        code: Vec<Bytecode>,
        defs: &ReachingDefAnnotation,
    ) -> Vec<Bytecode> {
        let mut res = vec![];
        for (pc, bytecode) in code.into_iter().enumerate() {
            let no_defs = BTreeMap::new();
            let reaching_defs = defs.0.get(&(pc as CodeOffset)).unwrap_or(&no_defs);
            let mut propagate = |local| Self::get_propagated_local(local, reaching_defs);
            res.push(bytecode.remap_src_vars(target, &mut propagate));
        }
        res
    }
pub fn copy_propagation ( target : & FunctionTarget < ' _ > , code : Vec < Bytecode > , defs : & ReachingDefAnnotation , ) -> Vec < Bytecode > { let mut res = vec ! [ ] ; for ( pc , bytecode ) in code . into_iter ( ) . enumerate ( ) { let no_defs = BTreeMap :: new ( ) ; let reaching_defs = defs . 0 . get ( & ( pc as CodeOffset ) ) . unwrap_or ( & no_defs ) ; let mut propagate = | local | Self :: get_propagated_local ( local , reaching_defs ) ; res . push ( bytecode . remap_src_vars ( target , & mut propagate ) ) ; } res }
Perform copy propagation based on reaching definitions analysis results.
Perform copy propagation based on reaching definitions analysis results .
target
&FunctionTarget<'_>
code
Vec<Bytecode>
defs
&ReachingDefAnnotation