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

src/share/vm/opto/escape.cpp

Print this page
rev 7201 : 8058746: escape analysis special case code for array copy broken by 7173584
Summary: escape analysis doesn't handler arraycopy nodes properly
Reviewed-by:

*** 880,901 **** case Op_Lock: case Op_Unlock: assert(false, "should be done already"); break; #endif case Op_CallLeafNoFP: ! is_arraycopy = (call->as_CallLeaf()->_name != NULL && strstr(call->as_CallLeaf()->_name, "arraycopy") != 0); // fall through case Op_CallLeaf: { // Stub calls, objects do not escape but they are not scale replaceable. // Adjust escape state for outgoing arguments. const TypeTuple * d = call->tf()->domain(); bool src_has_oops = false; for (uint i = TypeFunc::Parms; i < d->cnt(); i++) { const Type* at = d->field_at(i); Node *arg = call->in(i); const Type *aat = _igvn->type(arg); if (arg->is_top() || !at->isa_ptr() || !aat->isa_ptr()) continue; if (arg->is_AddP()) { // --- 880,909 ---- case Op_Lock: case Op_Unlock: assert(false, "should be done already"); break; #endif + case Op_ArrayCopy: case Op_CallLeafNoFP: ! // Most array copies are ArrayCopy nodes at this point but there ! // are still a few direct calls to the copy subroutines (See ! // PhaseStringOpts::copy_string()) ! is_arraycopy = (call->Opcode() == Op_ArrayCopy) || ! (call->as_CallLeaf()->_name != NULL && strstr(call->as_CallLeaf()->_name, "arraycopy") != 0); // fall through case Op_CallLeaf: { // Stub calls, objects do not escape but they are not scale replaceable. // Adjust escape state for outgoing arguments. const TypeTuple * d = call->tf()->domain(); bool src_has_oops = false; for (uint i = TypeFunc::Parms; i < d->cnt(); i++) { const Type* at = d->field_at(i); Node *arg = call->in(i); + if (arg == NULL) { + continue; + } const Type *aat = _igvn->type(arg); if (arg->is_top() || !at->isa_ptr() || !aat->isa_ptr()) continue; if (arg->is_AddP()) { //
src/share/vm/opto/escape.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File