< prev index next >

src/hotspot/share/opto/node.cpp

Print this page




1372       bs->unregister_potential_barrier_node(dead);
1373       igvn->C->record_dead_node(dead->_idx);
1374       // Kill all inputs to the dead guy
1375       for (uint i=0; i < dead->req(); i++) {
1376         Node *n = dead->in(i);      // Get input to dead guy
1377         if (n != NULL && !n->is_top()) { // Input is valid?
1378           dead->set_req(i, top);    // Smash input away
1379           if (n->outcnt() == 0) {   // Input also goes dead?
1380             if (!n->is_Con())
1381               nstack.push(n);       // Clear it out as well
1382           } else if (n->outcnt() == 1 &&
1383                      n->has_special_unique_user()) {
1384             igvn->add_users_to_worklist( n );
1385           } else if (n->outcnt() <= 2 && n->is_Store()) {
1386             // Push store's uses on worklist to enable folding optimization for
1387             // store/store and store/load to the same address.
1388             // The restriction (outcnt() <= 2) is the same as in set_req_X()
1389             // and remove_globally_dead_node().
1390             igvn->add_users_to_worklist( n );
1391           } else {
1392             BarrierSet::barrier_set()->barrier_set_c2()->enqueue_useful_gc_barrier(igvn->_worklist, n);
1393           }
1394         }
1395       }
1396     } // (dead->outcnt() == 0)
1397   }   // while (nstack.size() > 0) for outputs
1398   return;
1399 }
1400 
1401 //------------------------------remove_dead_region-----------------------------
1402 bool Node::remove_dead_region(PhaseGVN *phase, bool can_reshape) {
1403   Node *n = in(0);
1404   if( !n ) return false;
1405   // Lost control into this guy?  I.e., it became unreachable?
1406   // Aggressively kill all unreachable code.
1407   if (can_reshape && n->is_top()) {
1408     kill_dead_code(this, phase->is_IterGVN());
1409     return false; // Node is dead.
1410   }
1411 
1412   if( n->is_Region() && n->as_Region()->is_copy() ) {




1372       bs->unregister_potential_barrier_node(dead);
1373       igvn->C->record_dead_node(dead->_idx);
1374       // Kill all inputs to the dead guy
1375       for (uint i=0; i < dead->req(); i++) {
1376         Node *n = dead->in(i);      // Get input to dead guy
1377         if (n != NULL && !n->is_top()) { // Input is valid?
1378           dead->set_req(i, top);    // Smash input away
1379           if (n->outcnt() == 0) {   // Input also goes dead?
1380             if (!n->is_Con())
1381               nstack.push(n);       // Clear it out as well
1382           } else if (n->outcnt() == 1 &&
1383                      n->has_special_unique_user()) {
1384             igvn->add_users_to_worklist( n );
1385           } else if (n->outcnt() <= 2 && n->is_Store()) {
1386             // Push store's uses on worklist to enable folding optimization for
1387             // store/store and store/load to the same address.
1388             // The restriction (outcnt() <= 2) is the same as in set_req_X()
1389             // and remove_globally_dead_node().
1390             igvn->add_users_to_worklist( n );
1391           } else {
1392             BarrierSet::barrier_set()->barrier_set_c2()->enqueue_useful_gc_barrier(igvn, n);
1393           }
1394         }
1395       }
1396     } // (dead->outcnt() == 0)
1397   }   // while (nstack.size() > 0) for outputs
1398   return;
1399 }
1400 
1401 //------------------------------remove_dead_region-----------------------------
1402 bool Node::remove_dead_region(PhaseGVN *phase, bool can_reshape) {
1403   Node *n = in(0);
1404   if( !n ) return false;
1405   // Lost control into this guy?  I.e., it became unreachable?
1406   // Aggressively kill all unreachable code.
1407   if (can_reshape && n->is_top()) {
1408     kill_dead_code(this, phase->is_IterGVN());
1409     return false; // Node is dead.
1410   }
1411 
1412   if( n->is_Region() && n->as_Region()->is_copy() ) {


< prev index next >