pub fn mark<T>(ssa: &mut T)
where
    T: Clone
        + SSAExtra
        + SSAMod<ActionRef = <T as Graph>::GraphNodeRef, CFEdgeRef = <T as Graph>::GraphEdgeRef>,
{
    let nodes = ssa.values();
    let roots = registers_in_err!(ssa, exit_node_err!(ssa), ssa.invalid_value().unwrap());
    let mut queue = VecDeque::<T::ValueRef>::new();
    for node in &nodes {
        if let Ok(ref result) = ssa.node_data(*node) {
            if let NodeType::Op(ref op) = result.nt {
                if op.has_sideeffects() || ssa.is_selector(*node) {
                    queue.push_back(*node);
                }
            }
        } else {
            ssa.mark(node);
        }
    }
    ssa.clear_mark(&roots);
    queue.extend(&[roots]);
    while let Some(ni) = queue.pop_front() {
        if ssa.is_marked(&ni) {
            continue;
        }
        ssa.mark(&ni);
        queue.extend(ssa.operands_of(ni));
    }
}
/// Marks node for removal. This method does not remove nodes.
Marks node for removal. This method does not remove nodes.
Marks node for removal . This method does not remove nodes .
pub fn mark<T>(ssa: &mut T)
where
    T: Clone
        + SSAExtra
        + SSAMod<ActionRef = <T as Graph>::GraphNodeRef, CFEdgeRef = <T as Graph>::GraphEdgeRef>,
{
    let nodes = ssa.values();
    let roots = registers_in_err!(ssa, exit_node_err!(ssa), ssa.invalid_value().unwrap());
    let mut queue = VecDeque::<T::ValueRef>::new();
    for node in &nodes {
        if let Ok(ref result) = ssa.node_data(*node) {
            if let NodeType::Op(ref op) = result.nt {
                if op.has_sideeffects() || ssa.is_selector(*node) {
                    queue.push_back(*node);
                }
            }
        } else {
            ssa.mark(node);
        }
    }
    ssa.clear_mark(&roots);
    queue.extend(&[roots]);
    while let Some(ni) = queue.pop_front() {
        if ssa.is_marked(&ni) {
            continue;
        }
        ssa.mark(&ni);
        queue.extend(ssa.operands_of(ni));
    }
}
pub fn mark < T > ( ssa : & mut T ) where T : Clone + SSAExtra + SSAMod < ActionRef = < T as Graph > :: GraphNodeRef , CFEdgeRef = < T as Graph > :: GraphEdgeRef > , { let nodes = ssa . values ( ) ; let roots = registers_in_err ! ( ssa exit_node_err ( ssa ) ssa invalid_value ( ) unwrap ( ) ) ; let mut queue = VecDeque :: < T :: ValueRef > :: new ( ) ; for node in & nodes { if let Ok ( ref result ) = ssa . node_data ( * node ) { if let NodeType :: Op ( ref op ) = result . nt { if op . has_sideeffects ( ) || ssa . is_selector ( * node ) { queue . push_back ( * node ) ; } } } else { ssa . mark ( node ) ; } } ssa . clear_mark ( & roots ) ; queue . extend ( & [ roots ] ) ; while let Some ( ni ) = queue . pop_front ( ) { if ssa . is_marked ( & ni ) { continue ; } ssa . mark ( & ni ) ; queue . extend ( ssa . operands_of ( ni ) ) ; } }
Marks node for removal.
Marks node for removal .
ssa
&mut T
ssa
&mut T