278 Node* src, Node* src_offset,
279 Node* dest, Node* dest_offset,
280 Node* copy_length,
281 bool disjoint_bases,
282 bool length_never_negative,
283 RegionNode* slow_region) {
284 if (slow_region == NULL) {
285 slow_region = new RegionNode(1);
286 transform_later(slow_region);
287 }
288
289 Node* original_dest = dest;
290 bool dest_uninitialized = false;
291
292 // See if this is the initialization of a newly-allocated array.
293 // If so, we will take responsibility here for initializing it to zero.
294 // (Note: Because tightly_coupled_allocation performs checks on the
295 // out-edges of the dest, we need to avoid making derived pointers
296 // from it until we have checked its uses.)
297 if (ReduceBulkZeroing
298 && !ZeroTLAB // pointless if already zeroed
299 && basic_elem_type != T_CONFLICT // avoid corner case
300 && !src->eqv_uncast(dest)
301 && alloc != NULL
302 && _igvn.find_int_con(alloc->in(AllocateNode::ALength), 1) > 0
303 && alloc->maybe_set_complete(&_igvn)) {
304 // "You break it, you buy it."
305 InitializeNode* init = alloc->initialization();
306 assert(init->is_complete(), "we just did this");
307 init->set_complete_with_arraycopy();
308 assert(dest->is_CheckCastPP(), "sanity");
309 assert(dest->in(0)->in(0) == init, "dest pinned");
310 adr_type = TypeRawPtr::BOTTOM; // all initializations are into raw memory
311 // From this point on, every exit path is responsible for
312 // initializing any non-copied parts of the object to zero.
313 // Also, if this flag is set we make sure that arraycopy interacts properly
314 // with G1, eliding pre-barriers. See CR 6627983.
315 dest_uninitialized = true;
316 } else {
317 // No zeroing elimination here.
318 alloc = NULL;
|
278 Node* src, Node* src_offset,
279 Node* dest, Node* dest_offset,
280 Node* copy_length,
281 bool disjoint_bases,
282 bool length_never_negative,
283 RegionNode* slow_region) {
284 if (slow_region == NULL) {
285 slow_region = new RegionNode(1);
286 transform_later(slow_region);
287 }
288
289 Node* original_dest = dest;
290 bool dest_uninitialized = false;
291
292 // See if this is the initialization of a newly-allocated array.
293 // If so, we will take responsibility here for initializing it to zero.
294 // (Note: Because tightly_coupled_allocation performs checks on the
295 // out-edges of the dest, we need to avoid making derived pointers
296 // from it until we have checked its uses.)
297 if (ReduceBulkZeroing
298 && !(UseTLAB && ZeroTLAB) // pointless if already zeroed
299 && basic_elem_type != T_CONFLICT // avoid corner case
300 && !src->eqv_uncast(dest)
301 && alloc != NULL
302 && _igvn.find_int_con(alloc->in(AllocateNode::ALength), 1) > 0
303 && alloc->maybe_set_complete(&_igvn)) {
304 // "You break it, you buy it."
305 InitializeNode* init = alloc->initialization();
306 assert(init->is_complete(), "we just did this");
307 init->set_complete_with_arraycopy();
308 assert(dest->is_CheckCastPP(), "sanity");
309 assert(dest->in(0)->in(0) == init, "dest pinned");
310 adr_type = TypeRawPtr::BOTTOM; // all initializations are into raw memory
311 // From this point on, every exit path is responsible for
312 // initializing any non-copied parts of the object to zero.
313 // Also, if this flag is set we make sure that arraycopy interacts properly
314 // with G1, eliding pre-barriers. See CR 6627983.
315 dest_uninitialized = true;
316 } else {
317 // No zeroing elimination here.
318 alloc = NULL;
|