2052 use->req() == req()) {
2053 uint j;
2054 for (j = 0; j < use->req(); j++) {
2055 if (use->in(j) != in(j)) {
2056 break;
2057 }
2058 }
2059 if (j == use->req()) {
2060 return use;
2061 }
2062 }
2063 }
2064 }
2065 }
2066 return NULL;
2067 }
2068
2069
2070 //--------------------------unique_ctrl_out------------------------------
2071 // Return the unique control out if only one. Null if none or more than one.
2072 Node* Node::unique_ctrl_out() {
2073 Node* found = NULL;
2074 for (uint i = 0; i < outcnt(); i++) {
2075 Node* use = raw_out(i);
2076 if (use->is_CFG() && use != this) {
2077 if (found != NULL) return NULL;
2078 found = use;
2079 }
2080 }
2081 return found;
2082 }
2083
2084 //=============================================================================
2085 //------------------------------yank-------------------------------------------
2086 // Find and remove
2087 void Node_List::yank( Node *n ) {
2088 uint i;
2089 for( i = 0; i < _cnt; i++ )
2090 if( _nodes[i] == n )
2091 break;
2092
|
2052 use->req() == req()) {
2053 uint j;
2054 for (j = 0; j < use->req(); j++) {
2055 if (use->in(j) != in(j)) {
2056 break;
2057 }
2058 }
2059 if (j == use->req()) {
2060 return use;
2061 }
2062 }
2063 }
2064 }
2065 }
2066 return NULL;
2067 }
2068
2069
2070 //--------------------------unique_ctrl_out------------------------------
2071 // Return the unique control out if only one. Null if none or more than one.
2072 Node* Node::unique_ctrl_out() const {
2073 Node* found = NULL;
2074 for (uint i = 0; i < outcnt(); i++) {
2075 Node* use = raw_out(i);
2076 if (use->is_CFG() && use != this) {
2077 if (found != NULL) return NULL;
2078 found = use;
2079 }
2080 }
2081 return found;
2082 }
2083
2084 //=============================================================================
2085 //------------------------------yank-------------------------------------------
2086 // Find and remove
2087 void Node_List::yank( Node *n ) {
2088 uint i;
2089 for( i = 0; i < _cnt; i++ )
2090 if( _nodes[i] == n )
2091 break;
2092
|