< prev index next >

src/hotspot/share/opto/node.cpp

Print this page




1393       bs->unregister_potential_barrier_node(dead);
1394       igvn->C->record_dead_node(dead->_idx);
1395       // Kill all inputs to the dead guy
1396       for (uint i=0; i < dead->req(); i++) {
1397         Node *n = dead->in(i);      // Get input to dead guy
1398         if (n != NULL && !n->is_top()) { // Input is valid?
1399           dead->set_req(i, top);    // Smash input away
1400           if (n->outcnt() == 0) {   // Input also goes dead?
1401             if (!n->is_Con())
1402               nstack.push(n);       // Clear it out as well
1403           } else if (n->outcnt() == 1 &&
1404                      n->has_special_unique_user()) {
1405             igvn->add_users_to_worklist( n );
1406           } else if (n->outcnt() <= 2 && n->is_Store()) {
1407             // Push store's uses on worklist to enable folding optimization for
1408             // store/store and store/load to the same address.
1409             // The restriction (outcnt() <= 2) is the same as in set_req_X()
1410             // and remove_globally_dead_node().
1411             igvn->add_users_to_worklist( n );
1412           } else {
1413             BarrierSet::barrier_set()->barrier_set_c2()->enqueue_useful_gc_barrier(igvn->_worklist, n);
1414           }
1415         }
1416       }
1417     } // (dead->outcnt() == 0)
1418   }   // while (nstack.size() > 0) for outputs
1419   return;
1420 }
1421 
1422 //------------------------------remove_dead_region-----------------------------
1423 bool Node::remove_dead_region(PhaseGVN *phase, bool can_reshape) {
1424   Node *n = in(0);
1425   if( !n ) return false;
1426   // Lost control into this guy?  I.e., it became unreachable?
1427   // Aggressively kill all unreachable code.
1428   if (can_reshape && n->is_top()) {
1429     kill_dead_code(this, phase->is_IterGVN());
1430     return false; // Node is dead.
1431   }
1432 
1433   if( n->is_Region() && n->as_Region()->is_copy() ) {




1393       bs->unregister_potential_barrier_node(dead);
1394       igvn->C->record_dead_node(dead->_idx);
1395       // Kill all inputs to the dead guy
1396       for (uint i=0; i < dead->req(); i++) {
1397         Node *n = dead->in(i);      // Get input to dead guy
1398         if (n != NULL && !n->is_top()) { // Input is valid?
1399           dead->set_req(i, top);    // Smash input away
1400           if (n->outcnt() == 0) {   // Input also goes dead?
1401             if (!n->is_Con())
1402               nstack.push(n);       // Clear it out as well
1403           } else if (n->outcnt() == 1 &&
1404                      n->has_special_unique_user()) {
1405             igvn->add_users_to_worklist( n );
1406           } else if (n->outcnt() <= 2 && n->is_Store()) {
1407             // Push store's uses on worklist to enable folding optimization for
1408             // store/store and store/load to the same address.
1409             // The restriction (outcnt() <= 2) is the same as in set_req_X()
1410             // and remove_globally_dead_node().
1411             igvn->add_users_to_worklist( n );
1412           } else {
1413             BarrierSet::barrier_set()->barrier_set_c2()->enqueue_useful_gc_barrier(igvn, n);
1414           }
1415         }
1416       }
1417     } // (dead->outcnt() == 0)
1418   }   // while (nstack.size() > 0) for outputs
1419   return;
1420 }
1421 
1422 //------------------------------remove_dead_region-----------------------------
1423 bool Node::remove_dead_region(PhaseGVN *phase, bool can_reshape) {
1424   Node *n = in(0);
1425   if( !n ) return false;
1426   // Lost control into this guy?  I.e., it became unreachable?
1427   // Aggressively kill all unreachable code.
1428   if (can_reshape && n->is_top()) {
1429     kill_dead_code(this, phase->is_IterGVN());
1430     return false; // Node is dead.
1431   }
1432 
1433   if( n->is_Region() && n->as_Region()->is_copy() ) {


< prev index next >