< prev index next >

src/hotspot/share/opto/lcm.cpp

Print this page




1131 
1132     // Children are now all ready
1133     for (DUIterator_Fast i5max, i5 = n->fast_outs(i5max); i5 < i5max; i5++) {
1134       Node* m = n->fast_out(i5); // Get user
1135       if (get_block_for_node(m) != block) {
1136         continue;
1137       }
1138       if( m->is_Phi() ) continue;
1139       if (m->_idx >= max_idx) { // new node, skip it
1140         assert(m->is_MachProj() && n->is_Mach() && n->as_Mach()->has_call(), "unexpected node types");
1141         continue;
1142       }
1143       int m_cnt = ready_cnt.at(m->_idx) - 1;
1144       ready_cnt.at_put(m->_idx, m_cnt);
1145       if( m_cnt == 0 )
1146         worklist.push(m);
1147     }
1148   }
1149 
1150   if( phi_cnt != block->end_idx() ) {











1151     // did not schedule all.  Retry, Bailout, or Die
1152     if (C->subsume_loads() == true && !C->failing()) {
1153       // Retry with subsume_loads == false
1154       // If this is the first failure, the sentinel string will "stick"
1155       // to the Compile object, and the C2Compiler will see it and retry.
1156       C->record_failure(C2Compiler::retry_no_subsuming_loads());
1157     } else {
1158       assert(false, "graph should be schedulable");
1159     }
1160     // assert( phi_cnt == end_idx(), "did not schedule all" );
1161     return false;
1162   }
1163 
1164   if (OptoRegScheduling && block_size_threshold_ok) {
1165     _regalloc->compute_exit_block_pressure(block);
1166     block->_reg_pressure = _regalloc->_sched_int_pressure.final_pressure();
1167     block->_freg_pressure = _regalloc->_sched_float_pressure.final_pressure();
1168   }
1169 
1170 #ifndef PRODUCT




1131 
1132     // Children are now all ready
1133     for (DUIterator_Fast i5max, i5 = n->fast_outs(i5max); i5 < i5max; i5++) {
1134       Node* m = n->fast_out(i5); // Get user
1135       if (get_block_for_node(m) != block) {
1136         continue;
1137       }
1138       if( m->is_Phi() ) continue;
1139       if (m->_idx >= max_idx) { // new node, skip it
1140         assert(m->is_MachProj() && n->is_Mach() && n->as_Mach()->has_call(), "unexpected node types");
1141         continue;
1142       }
1143       int m_cnt = ready_cnt.at(m->_idx) - 1;
1144       ready_cnt.at_put(m->_idx, m_cnt);
1145       if( m_cnt == 0 )
1146         worklist.push(m);
1147     }
1148   }
1149 
1150   if( phi_cnt != block->end_idx() ) {
1151 #ifndef PRODUCT
1152     if (trace_opto_pipelining()) {
1153       for (uint j=0; j< block->number_of_nodes(); j++) {
1154         Node     *n = block->get_node(j);
1155         int     idx = n->_idx;
1156         tty->print("#   ready cnt:%3d  ", ready_cnt.at(idx));
1157         tty->print("latency:%3d  ", get_latency_for_node(n));
1158         tty->print("%4d: %s\n", idx, n->Name());
1159       }
1160     }
1161 #endif
1162     // did not schedule all.  Retry, Bailout, or Die
1163     if (C->subsume_loads() == true && !C->failing()) {
1164       // Retry with subsume_loads == false
1165       // If this is the first failure, the sentinel string will "stick"
1166       // to the Compile object, and the C2Compiler will see it and retry.
1167       C->record_failure(C2Compiler::retry_no_subsuming_loads());
1168     } else {
1169       assert(false, "graph should be schedulable");
1170     }
1171     // assert( phi_cnt == end_idx(), "did not schedule all" );
1172     return false;
1173   }
1174 
1175   if (OptoRegScheduling && block_size_threshold_ok) {
1176     _regalloc->compute_exit_block_pressure(block);
1177     block->_reg_pressure = _regalloc->_sched_int_pressure.final_pressure();
1178     block->_freg_pressure = _regalloc->_sched_float_pressure.final_pressure();
1179   }
1180 
1181 #ifndef PRODUCT


< prev index next >