1370
1371 //------------------------------remove_dead_region-----------------------------
1372 bool Node::remove_dead_region(PhaseGVN *phase, bool can_reshape) {
1373 Node *n = in(0);
1374 if( !n ) return false;
1375 // Lost control into this guy? I.e., it became unreachable?
1376 // Aggressively kill all unreachable code.
1377 if (can_reshape && n->is_top()) {
1378 kill_dead_code(this, phase->is_IterGVN());
1379 return false; // Node is dead.
1380 }
1381
1382 if( n->is_Region() && n->as_Region()->is_copy() ) {
1383 Node *m = n->nonnull_req();
1384 set_req(0, m);
1385 return true;
1386 }
1387 return false;
1388 }
1389
1390 //------------------------------Ideal_DU_postCCP-------------------------------
1391 // Idealize graph, using DU info. Must clone result into new-space
1392 Node *Node::Ideal_DU_postCCP( PhaseCCP * ) {
1393 return NULL; // Default to no change
1394 }
1395
1396 //------------------------------hash-------------------------------------------
1397 // Hash function over Nodes.
1398 uint Node::hash() const {
1399 uint sum = 0;
1400 for( uint i=0; i<_cnt; i++ ) // Add in all inputs
1401 sum = (sum<<1)-(uintptr_t)in(i); // Ignore embedded NULLs
1402 return (sum>>2) + _cnt + Opcode();
1403 }
1404
1405 //------------------------------cmp--------------------------------------------
1406 // Compare special parts of simple Nodes
1407 uint Node::cmp( const Node &n ) const {
1408 return 1; // Must be same
1409 }
1410
1411 //------------------------------rematerialize-----------------------------------
1412 // Should we clone rather than spill this instruction?
1413 bool Node::rematerialize() const {
1414 if ( is_Mach() )
1415 return this->as_Mach()->rematerialize();
|
1370
1371 //------------------------------remove_dead_region-----------------------------
1372 bool Node::remove_dead_region(PhaseGVN *phase, bool can_reshape) {
1373 Node *n = in(0);
1374 if( !n ) return false;
1375 // Lost control into this guy? I.e., it became unreachable?
1376 // Aggressively kill all unreachable code.
1377 if (can_reshape && n->is_top()) {
1378 kill_dead_code(this, phase->is_IterGVN());
1379 return false; // Node is dead.
1380 }
1381
1382 if( n->is_Region() && n->as_Region()->is_copy() ) {
1383 Node *m = n->nonnull_req();
1384 set_req(0, m);
1385 return true;
1386 }
1387 return false;
1388 }
1389
1390 //------------------------------hash-------------------------------------------
1391 // Hash function over Nodes.
1392 uint Node::hash() const {
1393 uint sum = 0;
1394 for( uint i=0; i<_cnt; i++ ) // Add in all inputs
1395 sum = (sum<<1)-(uintptr_t)in(i); // Ignore embedded NULLs
1396 return (sum>>2) + _cnt + Opcode();
1397 }
1398
1399 //------------------------------cmp--------------------------------------------
1400 // Compare special parts of simple Nodes
1401 uint Node::cmp( const Node &n ) const {
1402 return 1; // Must be same
1403 }
1404
1405 //------------------------------rematerialize-----------------------------------
1406 // Should we clone rather than spill this instruction?
1407 bool Node::rematerialize() const {
1408 if ( is_Mach() )
1409 return this->as_Mach()->rematerialize();
|