src/share/vm/opto/library_call.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
6857661 Cdiff src/share/vm/opto/library_call.cpp
src/share/vm/opto/library_call.cpp
Print this page
*** 4498,4527 ****
// (6) length must not be negative.
if (!length_never_negative) {
generate_negative_guard(copy_length, slow_region);
}
if (!stopped() && must_clear_dest) {
Node* dest_length = alloc->in(AllocateNode::ALength);
if (_gvn.eqv_uncast(copy_length, dest_length)
|| _gvn.find_int_con(dest_length, 1) <= 0) {
! // There is no zeroing to do.
} else {
// Clear the whole thing since there are no source elements to copy.
generate_clear_array(adr_type, dest, basic_elem_type,
intcon(0), NULL,
alloc->in(AllocateNode::AllocSize));
- }
- }
-
// Use a secondary InitializeNode as raw memory barrier.
// Currently it is needed only on this path since other
// paths have stub or runtime calls as raw memory barriers.
InitializeNode* init = insert_mem_bar_volatile(Op_Initialize,
Compile::AliasIdxRaw,
top())->as_Initialize();
init->set_complete(&_gvn); // (there is no corresponding AllocateNode)
// Present the results of the fast call.
result_region->init_req(zero_path, control());
result_i_o ->init_req(zero_path, i_o());
result_memory->init_req(zero_path, memory(adr_type));
--- 4498,4527 ----
// (6) length must not be negative.
if (!length_never_negative) {
generate_negative_guard(copy_length, slow_region);
}
+ // copy_length is 0.
if (!stopped() && must_clear_dest) {
Node* dest_length = alloc->in(AllocateNode::ALength);
if (_gvn.eqv_uncast(copy_length, dest_length)
|| _gvn.find_int_con(dest_length, 1) <= 0) {
! // There is no zeroing to do. No need for a secondary raw memory barrier.
} else {
// Clear the whole thing since there are no source elements to copy.
generate_clear_array(adr_type, dest, basic_elem_type,
intcon(0), NULL,
alloc->in(AllocateNode::AllocSize));
// Use a secondary InitializeNode as raw memory barrier.
// Currently it is needed only on this path since other
// paths have stub or runtime calls as raw memory barriers.
InitializeNode* init = insert_mem_bar_volatile(Op_Initialize,
Compile::AliasIdxRaw,
top())->as_Initialize();
init->set_complete(&_gvn); // (there is no corresponding AllocateNode)
+ }
+ }
// Present the results of the fast call.
result_region->init_req(zero_path, control());
result_i_o ->init_req(zero_path, i_o());
result_memory->init_req(zero_path, memory(adr_type));
src/share/vm/opto/library_call.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File