fn scalars_mutated_in_blocks(cfg: &il::ControlFlowGraph) -> HashMap<il::Scalar, HashSet<usize>> {
    let mut mutated_in = HashMap::new();

    for block in cfg.blocks() {
        for scalar in scalars_mutated_in_block(block) {
            if !mutated_in.contains_key(scalar) {
                mutated_in.insert(scalar.clone(), HashSet::new());
            }
            mutated_in.get_mut(scalar).unwrap().insert(block.index());
        }
    }

    mutated_in
}
/// Get a mapping from scalars to a set of blocks (indices) in which they are mutated.
Get a mapping from scalars to a set of blocks (indices) in which they are mutated.
Get a mapping from scalars to a set of blocks ( indices ) in which they are mutated .
fn scalars_mutated_in_blocks(cfg: &il::ControlFlowGraph) -> HashMap<il::Scalar, HashSet<usize>> {
    let mut mutated_in = HashMap::new();
    for block in cfg.blocks() {
        for scalar in scalars_mutated_in_block(block) {
            if !mutated_in.contains_key(scalar) {
                mutated_in.insert(scalar.clone(), HashSet::new());
            }
            mutated_in.get_mut(scalar).unwrap().insert(block.index());
        }
    }
    mutated_in
}
fn scalars_mutated_in_blocks ( cfg : & il :: ControlFlowGraph ) -> HashMap < il :: Scalar , HashSet < usize > > { let mut mutated_in = HashMap :: new ( ) ; for block in cfg . blocks ( ) { for scalar in scalars_mutated_in_block ( block ) { if ! mutated_in . contains_key ( scalar ) { mutated_in . insert ( scalar . clone ( ) , HashSet :: new ( ) ) ; } mutated_in . get_mut ( scalar ) . unwrap ( ) . insert ( block . index ( ) ) ; } } mutated_in }
Get a mapping from scalars to a set of blocks (indices) in which they are mutated.
Get a mapping from scalars to a set of blocks ( indices ) in which they are mutated .
cfg
&il::ControlFlowGraph
cfg
&il::ControlFlowGraph