< prev index next >

src/hotspot/share/opto/node.cpp

Print this page




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




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


< prev index next >