src/share/vm/opto/escape.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6984348 Sdiff src/share/vm/opto

src/share/vm/opto/escape.cpp

Print this page




1443           // Move memory users of a store first.
1444           move_inst_mem(n, orig_phis, igvn);
1445         }
1446         // Now update memory input
1447         igvn->hash_delete(n);
1448         n->set_req(MemNode::Memory, nmem);
1449         igvn->hash_insert(n);
1450         record_for_optimizer(n);
1451       } else {
1452         assert(n->is_Allocate() || n->is_CheckCastPP() ||
1453                n->is_AddP() || n->is_Phi(), "unknown node used for set_map()");
1454       }
1455     }
1456   }
1457 #ifdef ASSERT
1458   // Verify that memory was split correctly
1459   while (old_mems.is_nonempty()) {
1460     Node* old_mem = old_mems.node();
1461     uint  old_cnt = old_mems.index();
1462     old_mems.pop();
1463     assert(old_cnt = old_mem->outcnt(), "old mem could be lost");
1464   }
1465 #endif
1466 }
1467 
1468 bool ConnectionGraph::has_candidates(Compile *C) {
1469   // EA brings benefits only when the code has allocations and/or locks which
1470   // are represented by ideal Macro nodes.
1471   int cnt = C->macro_count();
1472   for( int i=0; i < cnt; i++ ) {
1473     Node *n = C->macro_node(i);
1474     if ( n->is_Allocate() )
1475       return true;
1476     if( n->is_Lock() ) {
1477       Node* obj = n->as_Lock()->obj_node()->uncast();
1478       if( !(obj->is_Parm() || obj->is_Con()) )
1479         return true;
1480     }
1481   }
1482   return false;
1483 }




1443           // Move memory users of a store first.
1444           move_inst_mem(n, orig_phis, igvn);
1445         }
1446         // Now update memory input
1447         igvn->hash_delete(n);
1448         n->set_req(MemNode::Memory, nmem);
1449         igvn->hash_insert(n);
1450         record_for_optimizer(n);
1451       } else {
1452         assert(n->is_Allocate() || n->is_CheckCastPP() ||
1453                n->is_AddP() || n->is_Phi(), "unknown node used for set_map()");
1454       }
1455     }
1456   }
1457 #ifdef ASSERT
1458   // Verify that memory was split correctly
1459   while (old_mems.is_nonempty()) {
1460     Node* old_mem = old_mems.node();
1461     uint  old_cnt = old_mems.index();
1462     old_mems.pop();
1463     assert(old_cnt == old_mem->outcnt(), "old mem could be lost");
1464   }
1465 #endif
1466 }
1467 
1468 bool ConnectionGraph::has_candidates(Compile *C) {
1469   // EA brings benefits only when the code has allocations and/or locks which
1470   // are represented by ideal Macro nodes.
1471   int cnt = C->macro_count();
1472   for( int i=0; i < cnt; i++ ) {
1473     Node *n = C->macro_node(i);
1474     if ( n->is_Allocate() )
1475       return true;
1476     if( n->is_Lock() ) {
1477       Node* obj = n->as_Lock()->obj_node()->uncast();
1478       if( !(obj->is_Parm() || obj->is_Con()) )
1479         return true;
1480     }
1481   }
1482   return false;
1483 }


src/share/vm/opto/escape.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File