< prev index next > src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp
Print this page
Node* const src = ac->in(ArrayCopyNode::Src);
const TypeAryPtr* const ary_ptr = src->get_ptr_type()->isa_aryptr();
if (ac->is_clone_array() && ary_ptr != nullptr) {
BasicType bt = ary_ptr->elem()->array_element_basic_type();
! if (is_reference_type(bt)) {
// Clone object array
bt = T_OBJECT;
} else {
// Clone primitive array
bt = T_LONG;
Node* const src = ac->in(ArrayCopyNode::Src);
const TypeAryPtr* const ary_ptr = src->get_ptr_type()->isa_aryptr();
if (ac->is_clone_array() && ary_ptr != nullptr) {
BasicType bt = ary_ptr->elem()->array_element_basic_type();
! if (is_reference_type(bt) && !ary_ptr->is_flat()) {
// Clone object array
bt = T_OBJECT;
} else {
// Clone primitive array
bt = T_LONG;
assert(src_offset == dest_offset, "should be equal");
const jlong offset = src_offset->get_long();
if (offset != arrayOopDesc::base_offset_in_bytes(T_OBJECT)) {
assert(!UseCompressedClassPointers, "should only happen without compressed class pointers");
assert((arrayOopDesc::base_offset_in_bytes(T_OBJECT) - offset) == BytesPerLong, "unexpected offset");
! length = phase->transform_later(new SubLNode(length, phase->longcon(1))); // Size is in longs
src_offset = phase->longcon(arrayOopDesc::base_offset_in_bytes(T_OBJECT));
dest_offset = src_offset;
}
}
Node* const payload_src = phase->basic_plus_adr(src, src_offset);
assert(src_offset == dest_offset, "should be equal");
const jlong offset = src_offset->get_long();
if (offset != arrayOopDesc::base_offset_in_bytes(T_OBJECT)) {
assert(!UseCompressedClassPointers, "should only happen without compressed class pointers");
assert((arrayOopDesc::base_offset_in_bytes(T_OBJECT) - offset) == BytesPerLong, "unexpected offset");
! length = phase->transform_later(new SubXNode(length, phase->longcon(1))); // Size is in longs
src_offset = phase->longcon(arrayOopDesc::base_offset_in_bytes(T_OBJECT));
dest_offset = src_offset;
}
}
Node* const payload_src = phase->basic_plus_adr(src, src_offset);
analyze_dominating_barriers_impl(loads, load_dominators);
analyze_dominating_barriers_impl(stores, store_dominators);
analyze_dominating_barriers_impl(atomics, atomic_dominators);
}
! void ZBarrierSetC2::eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const {
eliminate_gc_barrier_data(node);
}
void ZBarrierSetC2::eliminate_gc_barrier_data(Node* node) const {
if (node->is_LoadStore()) {
analyze_dominating_barriers_impl(loads, load_dominators);
analyze_dominating_barriers_impl(stores, store_dominators);
analyze_dominating_barriers_impl(atomics, atomic_dominators);
}
!
+ void ZBarrierSetC2::eliminate_gc_barrier(PhaseIterGVN* igvn, Node* node) const {
eliminate_gc_barrier_data(node);
}
void ZBarrierSetC2::eliminate_gc_barrier_data(Node* node) const {
if (node->is_LoadStore()) {
< prev index next >