mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-23 16:55:09 +00:00
8058746: escape analysis special case code for array copy broken by 7173584
Escape analysis doesn't handler arraycopy nodes properly Reviewed-by: kvn, iveresov, vlivanov
This commit is contained in:
parent
f8d533e6b6
commit
f575843d51
@ -882,9 +882,14 @@ void ConnectionGraph::process_call_arguments(CallNode *call) {
|
||||
assert(false, "should be done already");
|
||||
break;
|
||||
#endif
|
||||
case Op_ArrayCopy:
|
||||
case Op_CallLeafNoFP:
|
||||
is_arraycopy = (call->as_CallLeaf()->_name != NULL &&
|
||||
strstr(call->as_CallLeaf()->_name, "arraycopy") != 0);
|
||||
// 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.
|
||||
@ -894,6 +899,9 @@ void ConnectionGraph::process_call_arguments(CallNode *call) {
|
||||
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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user