Mercurial > hg > truffle
comparison src/share/vm/opto/library_call.cpp @ 3961:a92cdbac8b9e
7081933: Use zeroing elimination optimization for large array
Summary: Don't zero new typeArray during runtime call if the allocation is followed by arraycopy into it.
Reviewed-by: twisti
author | kvn |
---|---|
date | Mon, 26 Sep 2011 10:24:05 -0700 |
parents | b2cb497dec28 |
children | 52b5d32fbfaf 069ab3f976d3 |
comparison
equal
deleted
inserted
replaced
3960:f08d439fab8c | 3961:a92cdbac8b9e |
---|---|
4656 && _gvn.find_int_con(alloc->in(AllocateNode::ALength), 1) > 0 | 4656 && _gvn.find_int_con(alloc->in(AllocateNode::ALength), 1) > 0 |
4657 && alloc->maybe_set_complete(&_gvn)) { | 4657 && alloc->maybe_set_complete(&_gvn)) { |
4658 // "You break it, you buy it." | 4658 // "You break it, you buy it." |
4659 InitializeNode* init = alloc->initialization(); | 4659 InitializeNode* init = alloc->initialization(); |
4660 assert(init->is_complete(), "we just did this"); | 4660 assert(init->is_complete(), "we just did this"); |
4661 init->set_complete_with_arraycopy(); | |
4661 assert(dest->is_CheckCastPP(), "sanity"); | 4662 assert(dest->is_CheckCastPP(), "sanity"); |
4662 assert(dest->in(0)->in(0) == init, "dest pinned"); | 4663 assert(dest->in(0)->in(0) == init, "dest pinned"); |
4663 adr_type = TypeRawPtr::BOTTOM; // all initializations are into raw memory | 4664 adr_type = TypeRawPtr::BOTTOM; // all initializations are into raw memory |
4664 // From this point on, every exit path is responsible for | 4665 // From this point on, every exit path is responsible for |
4665 // initializing any non-copied parts of the object to zero. | 4666 // initializing any non-copied parts of the object to zero. |