4641 Node* original_dest = dest;
4642 AllocateArrayNode* alloc = NULL; // used for zeroing, if needed
4643 bool dest_uninitialized = false;
4644
4645 // See if this is the initialization of a newly-allocated array.
4646 // If so, we will take responsibility here for initializing it to zero.
4647 // (Note: Because tightly_coupled_allocation performs checks on the
4648 // out-edges of the dest, we need to avoid making derived pointers
4649 // from it until we have checked its uses.)
4650 if (ReduceBulkZeroing
4651 && !ZeroTLAB // pointless if already zeroed
4652 && basic_elem_type != T_CONFLICT // avoid corner case
4653 && !_gvn.eqv_uncast(src, dest)
4654 && ((alloc = tightly_coupled_allocation(dest, slow_region))
4655 != NULL)
4656 && _gvn.find_int_con(alloc->in(AllocateNode::ALength), 1) > 0
4657 && alloc->maybe_set_complete(&_gvn)) {
4658 // "You break it, you buy it."
4659 InitializeNode* init = alloc->initialization();
4660 assert(init->is_complete(), "we just did this");
4661 assert(dest->is_CheckCastPP(), "sanity");
4662 assert(dest->in(0)->in(0) == init, "dest pinned");
4663 adr_type = TypeRawPtr::BOTTOM; // all initializations are into raw memory
4664 // From this point on, every exit path is responsible for
4665 // initializing any non-copied parts of the object to zero.
4666 // Also, if this flag is set we make sure that arraycopy interacts properly
4667 // with G1, eliding pre-barriers. See CR 6627983.
4668 dest_uninitialized = true;
4669 } else {
4670 // No zeroing elimination here.
4671 alloc = NULL;
4672 //original_dest = dest;
4673 //dest_uninitialized = false;
4674 }
4675
4676 // Results are placed here:
4677 enum { fast_path = 1, // normal void-returning assembly stub
4678 checked_path = 2, // special assembly stub with cleanup
4679 slow_call_path = 3, // something went wrong; call the VM
4680 zero_path = 4, // bypass when length of copy is zero
|
4641 Node* original_dest = dest;
4642 AllocateArrayNode* alloc = NULL; // used for zeroing, if needed
4643 bool dest_uninitialized = false;
4644
4645 // See if this is the initialization of a newly-allocated array.
4646 // If so, we will take responsibility here for initializing it to zero.
4647 // (Note: Because tightly_coupled_allocation performs checks on the
4648 // out-edges of the dest, we need to avoid making derived pointers
4649 // from it until we have checked its uses.)
4650 if (ReduceBulkZeroing
4651 && !ZeroTLAB // pointless if already zeroed
4652 && basic_elem_type != T_CONFLICT // avoid corner case
4653 && !_gvn.eqv_uncast(src, dest)
4654 && ((alloc = tightly_coupled_allocation(dest, slow_region))
4655 != NULL)
4656 && _gvn.find_int_con(alloc->in(AllocateNode::ALength), 1) > 0
4657 && alloc->maybe_set_complete(&_gvn)) {
4658 // "You break it, you buy it."
4659 InitializeNode* init = alloc->initialization();
4660 assert(init->is_complete(), "we just did this");
4661 init->set_complete_with_arraycopy();
4662 assert(dest->is_CheckCastPP(), "sanity");
4663 assert(dest->in(0)->in(0) == init, "dest pinned");
4664 adr_type = TypeRawPtr::BOTTOM; // all initializations are into raw memory
4665 // From this point on, every exit path is responsible for
4666 // initializing any non-copied parts of the object to zero.
4667 // Also, if this flag is set we make sure that arraycopy interacts properly
4668 // with G1, eliding pre-barriers. See CR 6627983.
4669 dest_uninitialized = true;
4670 } else {
4671 // No zeroing elimination here.
4672 alloc = NULL;
4673 //original_dest = dest;
4674 //dest_uninitialized = false;
4675 }
4676
4677 // Results are placed here:
4678 enum { fast_path = 1, // normal void-returning assembly stub
4679 checked_path = 2, // special assembly stub with cleanup
4680 slow_call_path = 3, // something went wrong; call the VM
4681 zero_path = 4, // bypass when length of copy is zero
|