< prev index next >

src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp

Print this page
*** 457,11 ***
    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;
--- 457,11 ---
    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;

*** 483,11 ***
        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);
--- 483,11 ---
        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);

*** 528,11 ***
                                             src,
                                             dst,
                                             full_size,
                                             phase->top());
    phase->transform_later(call);
!   phase->igvn().replace_node(ac, call);
  }
  
  #undef XTOP
  
  // == Dominating barrier elision ==
--- 528,11 ---
                                             src,
                                             dst,
                                             full_size,
                                             phase->top());
    phase->transform_later(call);
!   phase->replace_node(ac, call);
  }
  
  #undef XTOP
  
  // == Dominating barrier elision ==

*** 943,11 ***
        }
      }
    }
  }
  
! 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()) {
--- 943,11 ---
        }
      }
    }
  }
  
! 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 >