pub fn propagate_reginfo(&mut self, node: &T::ValueRef) {
        let args = self.ssa.operands_of(*node);
        // For OpWiden/OpNarrow, they only have one operation;
        // For OpAnd/OpOr, OpLsl, only their first operand coule be register;
        // For Phi node, their operations have the same reginfo;
        // Thus, choosing the first operand is enough.

        // No arguments, nothing to do.
        if args.len() == 0 {
            return;
        }

        let regnames = self.ssa.registers(args[0]);
        if !regnames.is_empty() {
            for regname in &regnames {
                self.ssa.set_register(node.clone(), regname.clone());
                // Check whether its child nodes are incomplete
            }
            for user in self.ssa.uses_of(*node) {
                if let Some(victim) = self.incomplete_propagation.take(&user) {
                    self.propagate_reginfo(&victim);
                }
            }
        } else {
            // Wait its parent node to be propagated.
            self.incomplete_propagation.insert(*node);
            radeco_trace!(
                "Fail in propagate_reginfo: {:?} with {:?}",
                node,
                self.ssa.node_data(*node)
            );
            radeco_trace!(
                "First operand is {:?} with {:?}",
                args[0],
                self.ssa.node_data(args[0])
            );
        }
    }
// Copy the reginfo from operand into expr, especially for OpWiden/OpNarrow,
// OpAnd/OpOr, OpLsl, which are used in width change, also, for Phi nodes.
Copy the reginfo from operand into expr, especially for OpWiden/OpNarrow,
OpAnd/OpOr, OpLsl, which are used in width change, also, for Phi nodes.
Copy the reginfo from operand into expr especially for OpWiden / OpNarrow OpAnd / OpOr OpLsl which are used in width change also for Phi nodes .
pub fn propagate_reginfo(&mut self, node: &T::ValueRef) {
        let args = self.ssa.operands_of(*node);
        // For OpWiden/OpNarrow, they only have one operation;
        // For OpAnd/OpOr, OpLsl, only their first operand coule be register;
        // For Phi node, their operations have the same reginfo;
        // Thus, choosing the first operand is enough.
        // No arguments, nothing to do.
        if args.len() == 0 {
            return;
        }
        let regnames = self.ssa.registers(args[0]);
        if !regnames.is_empty() {
            for regname in &regnames {
                self.ssa.set_register(node.clone(), regname.clone());
                // Check whether its child nodes are incomplete
            }
            for user in self.ssa.uses_of(*node) {
                if let Some(victim) = self.incomplete_propagation.take(&user) {
                    self.propagate_reginfo(&victim);
                }
            }
        } else {
            // Wait its parent node to be propagated.
            self.incomplete_propagation.insert(*node);
            radeco_trace!(
                "Fail in propagate_reginfo: {:?} with {:?}",
                node,
                self.ssa.node_data(*node)
            );
            radeco_trace!(
                "First operand is {:?} with {:?}",
                args[0],
                self.ssa.node_data(args[0])
            );
        }
    }
pub fn propagate_reginfo ( & mut self , node : & T :: ValueRef ) { let args = self . ssa . operands_of ( * node ) ; // For OpWiden/OpNarrow, they only have one operation; // For OpAnd/OpOr, OpLsl, only their first operand coule be register; // For Phi node, their operations have the same reginfo; // Thus, choosing the first operand is enough. // No arguments, nothing to do. if args . len ( ) == 0 { return ; } let regnames = self . ssa . registers ( args [ 0 ] ) ; if ! regnames . is_empty ( ) { for regname in & regnames { self . ssa . set_register ( node . clone ( ) , regname . clone ( ) ) ; // Check whether its child nodes are incomplete } for user in self . ssa . uses_of ( * node ) { if let Some ( victim ) = self . incomplete_propagation . take ( & user ) { self . propagate_reginfo ( & victim ) ; } } } else { // Wait its parent node to be propagated. self . incomplete_propagation . insert ( * node ) ; radeco_trace ! ( " " node self ssa node_data ( node ) ) ; radeco_trace ! ( " " args [ 0 ] self ssa node_data ( args [ 0 ] ) ) ; } }
Copy the reginfo from operand into expr, especially for OpWiden/OpNarrow,
OpAnd/OpOr, OpLsl, which are used in width change, also, for Phi nodes.
Copy the reginfo from operand into expr especially for OpWiden / OpNarrow OpAnd / OpOr OpLsl which are used in width change also for Phi nodes .
&mut self
node
&T::ValueRef
&mut self
node
&T::ValueRef