Mercurial > hg > truffle
comparison src/share/vm/opto/library_call.cpp @ 836:4325cdaa78ad
6857661: 64-bit server VM: assert(is_Initialize(),"invalid node class")
Summary: Move the secondary raw memory barrier to the correct place in generate_arraycopy().
Reviewed-by: never
author | kvn |
---|---|
date | Mon, 06 Jul 2009 15:53:30 -0700 |
parents | acba6af809c8 |
children | fc4be448891f |
comparison
equal
deleted
inserted
replaced
835:73dac61fe300 | 836:4325cdaa78ad |
---|---|
4498 // (6) length must not be negative. | 4498 // (6) length must not be negative. |
4499 if (!length_never_negative) { | 4499 if (!length_never_negative) { |
4500 generate_negative_guard(copy_length, slow_region); | 4500 generate_negative_guard(copy_length, slow_region); |
4501 } | 4501 } |
4502 | 4502 |
4503 // copy_length is 0. | |
4503 if (!stopped() && must_clear_dest) { | 4504 if (!stopped() && must_clear_dest) { |
4504 Node* dest_length = alloc->in(AllocateNode::ALength); | 4505 Node* dest_length = alloc->in(AllocateNode::ALength); |
4505 if (_gvn.eqv_uncast(copy_length, dest_length) | 4506 if (_gvn.eqv_uncast(copy_length, dest_length) |
4506 || _gvn.find_int_con(dest_length, 1) <= 0) { | 4507 || _gvn.find_int_con(dest_length, 1) <= 0) { |
4507 // There is no zeroing to do. | 4508 // There is no zeroing to do. No need for a secondary raw memory barrier. |
4508 } else { | 4509 } else { |
4509 // Clear the whole thing since there are no source elements to copy. | 4510 // Clear the whole thing since there are no source elements to copy. |
4510 generate_clear_array(adr_type, dest, basic_elem_type, | 4511 generate_clear_array(adr_type, dest, basic_elem_type, |
4511 intcon(0), NULL, | 4512 intcon(0), NULL, |
4512 alloc->in(AllocateNode::AllocSize)); | 4513 alloc->in(AllocateNode::AllocSize)); |
4514 // Use a secondary InitializeNode as raw memory barrier. | |
4515 // Currently it is needed only on this path since other | |
4516 // paths have stub or runtime calls as raw memory barriers. | |
4517 InitializeNode* init = insert_mem_bar_volatile(Op_Initialize, | |
4518 Compile::AliasIdxRaw, | |
4519 top())->as_Initialize(); | |
4520 init->set_complete(&_gvn); // (there is no corresponding AllocateNode) | |
4513 } | 4521 } |
4514 } | 4522 } |
4515 | |
4516 // Use a secondary InitializeNode as raw memory barrier. | |
4517 // Currently it is needed only on this path since other | |
4518 // paths have stub or runtime calls as raw memory barriers. | |
4519 InitializeNode* init = insert_mem_bar_volatile(Op_Initialize, | |
4520 Compile::AliasIdxRaw, | |
4521 top())->as_Initialize(); | |
4522 init->set_complete(&_gvn); // (there is no corresponding AllocateNode) | |
4523 | 4523 |
4524 // Present the results of the fast call. | 4524 // Present the results of the fast call. |
4525 result_region->init_req(zero_path, control()); | 4525 result_region->init_req(zero_path, control()); |
4526 result_i_o ->init_req(zero_path, i_o()); | 4526 result_i_o ->init_req(zero_path, i_o()); |
4527 result_memory->init_req(zero_path, memory(adr_type)); | 4527 result_memory->init_req(zero_path, memory(adr_type)); |