2091 tty->print("# AddNodeToAvailableList: ");
2092 n->dump();
2093 }
2094 #endif
2095
2096 int latency = _current_latency[n->_idx];
2097
2098 // Insert in latency order (insertion sort)
2099 uint i;
2100 for ( i=0; i < _available.size(); i++ )
2101 if (_current_latency[_available[i]->_idx] > latency)
2102 break;
2103
2104 // Special Check for compares following branches
2105 if( n->is_Mach() && _scheduled.size() > 0 ) {
2106 int op = n->as_Mach()->ideal_Opcode();
2107 Node *last = _scheduled[0];
2108 if( last->is_MachIf() && last->in(1) == n &&
2109 ( op == Op_CmpI ||
2110 op == Op_CmpU ||
2111 op == Op_CmpP ||
2112 op == Op_CmpF ||
2113 op == Op_CmpD ||
2114 op == Op_CmpL ) ) {
2115
2116 // Recalculate position, moving to front of same latency
2117 for ( i=0 ; i < _available.size(); i++ )
2118 if (_current_latency[_available[i]->_idx] >= latency)
2119 break;
2120 }
2121 }
2122
2123 // Insert the node in the available list
2124 _available.insert(i, n);
2125
2126 #ifndef PRODUCT
2127 if (_cfg->C->trace_opto_output())
2128 dump_available();
2129 #endif
2130 }
|
2091 tty->print("# AddNodeToAvailableList: ");
2092 n->dump();
2093 }
2094 #endif
2095
2096 int latency = _current_latency[n->_idx];
2097
2098 // Insert in latency order (insertion sort)
2099 uint i;
2100 for ( i=0; i < _available.size(); i++ )
2101 if (_current_latency[_available[i]->_idx] > latency)
2102 break;
2103
2104 // Special Check for compares following branches
2105 if( n->is_Mach() && _scheduled.size() > 0 ) {
2106 int op = n->as_Mach()->ideal_Opcode();
2107 Node *last = _scheduled[0];
2108 if( last->is_MachIf() && last->in(1) == n &&
2109 ( op == Op_CmpI ||
2110 op == Op_CmpU ||
2111 op == Op_CmpUL ||
2112 op == Op_CmpP ||
2113 op == Op_CmpF ||
2114 op == Op_CmpD ||
2115 op == Op_CmpL ) ) {
2116
2117 // Recalculate position, moving to front of same latency
2118 for ( i=0 ; i < _available.size(); i++ )
2119 if (_current_latency[_available[i]->_idx] >= latency)
2120 break;
2121 }
2122 }
2123
2124 // Insert the node in the available list
2125 _available.insert(i, n);
2126
2127 #ifndef PRODUCT
2128 if (_cfg->C->trace_opto_output())
2129 dump_available();
2130 #endif
2131 }
|