377 mem = mem->in(0); |
377 mem = mem->in(0); |
378 Node* adr = NULL; |
378 Node* adr = NULL; |
379 if (mem->is_LoadStore()) { |
379 if (mem->is_LoadStore()) { |
380 adr = mem->in(MemNode::Address); |
380 adr = mem->in(MemNode::Address); |
381 } else { |
381 } else { |
382 assert(mem->Opcode() == Op_EncodeISOArray, "sanity"); |
382 assert(mem->Opcode() == Op_EncodeISOArray || |
|
383 mem->Opcode() == Op_StrCompressedCopy, "sanity"); |
383 adr = mem->in(3); // Destination array |
384 adr = mem->in(3); // Destination array |
384 } |
385 } |
385 const TypePtr* atype = adr->bottom_type()->is_ptr(); |
386 const TypePtr* atype = adr->bottom_type()->is_ptr(); |
386 int adr_idx = phase->C->get_alias_index(atype); |
387 int adr_idx = phase->C->get_alias_index(atype); |
387 if (adr_idx == alias_idx) { |
388 if (adr_idx == alias_idx) { |
388 assert(false, "Object is not scalar replaceable if a LoadStore node access its field"); |
389 DEBUG_ONLY(mem->dump();) |
|
390 assert(false, "Object is not scalar replaceable if a LoadStore node accesses its field"); |
|
391 return NULL; |
|
392 } |
|
393 mem = mem->in(MemNode::Memory); |
|
394 } else if (mem->Opcode() == Op_StrInflatedCopy) { |
|
395 Node* adr = mem->in(3); // Destination array |
|
396 const TypePtr* atype = adr->bottom_type()->is_ptr(); |
|
397 int adr_idx = phase->C->get_alias_index(atype); |
|
398 if (adr_idx == alias_idx) { |
|
399 DEBUG_ONLY(mem->dump();) |
|
400 assert(false, "Object is not scalar replaceable if a StrInflatedCopy node accesses its field"); |
389 return NULL; |
401 return NULL; |
390 } |
402 } |
391 mem = mem->in(MemNode::Memory); |
403 mem = mem->in(MemNode::Memory); |
392 } else { |
404 } else { |
393 return mem; |
405 return mem; |
514 if (val == NULL) { |
526 if (val == NULL) { |
515 return NULL; |
527 return NULL; |
516 } |
528 } |
517 values.at_put(j, val); |
529 values.at_put(j, val); |
518 } else if (val->Opcode() == Op_SCMemProj) { |
530 } else if (val->Opcode() == Op_SCMemProj) { |
519 assert(val->in(0)->is_LoadStore() || val->in(0)->Opcode() == Op_EncodeISOArray, "sanity"); |
531 assert(val->in(0)->is_LoadStore() || |
520 assert(false, "Object is not scalar replaceable if a LoadStore node access its field"); |
532 val->in(0)->Opcode() == Op_EncodeISOArray || |
|
533 val->in(0)->Opcode() == Op_StrCompressedCopy, "sanity"); |
|
534 assert(false, "Object is not scalar replaceable if a LoadStore node accesses its field"); |
521 return NULL; |
535 return NULL; |
522 } else if (val->is_ArrayCopy()) { |
536 } else if (val->is_ArrayCopy()) { |
523 Node* res = make_arraycopy_load(val->as_ArrayCopy(), offset, val->in(0), ft, phi_type, alloc); |
537 Node* res = make_arraycopy_load(val->as_ArrayCopy(), offset, val->in(0), ft, phi_type, alloc); |
524 if (res == NULL) { |
538 if (res == NULL) { |
525 return NULL; |
539 return NULL; |