< prev index next >

src/hotspot/share/opto/memnode.cpp

Print this page
*** 104,10 ***
--- 104,11 ---
      st->print(" mismatched");
    }
    if (_unsafe_access) {
      st->print(" unsafe");
    }
+   st->print(" barrier: %u", _barrier_data);
  }
  
  void MemNode::dump_adr_type(const Node* mem, const TypePtr* adr_type, outputStream *st) {
    st->print(" @");
    if (adr_type == nullptr) {

*** 648,14 ***
        ArrayCopyNode* ac = nullptr;
        if (mb->in(0) != nullptr && mb->in(0)->is_Proj() &&
            mb->in(0)->in(0) != nullptr && mb->in(0)->in(0)->is_ArrayCopy()) {
          ac = mb->in(0)->in(0)->as_ArrayCopy();
        } else {
!         // Step over GC barrier when ReduceInitialCardMarks is disabled
-         BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
-         Node* control_proj_ac = bs->step_over_gc_barrier(mb->in(0));
- 
          if (control_proj_ac->is_Proj() && control_proj_ac->in(0)->is_ArrayCopy()) {
            ac = control_proj_ac->in(0)->as_ArrayCopy();
          }
        }
  
--- 649,11 ---
        ArrayCopyNode* ac = nullptr;
        if (mb->in(0) != nullptr && mb->in(0)->is_Proj() &&
            mb->in(0)->in(0) != nullptr && mb->in(0)->in(0)->is_ArrayCopy()) {
          ac = mb->in(0)->in(0)->as_ArrayCopy();
        } else {
!         Node* control_proj_ac = mb->in(0);
          if (control_proj_ac->is_Proj() && control_proj_ac->in(0)->is_ArrayCopy()) {
            ac = control_proj_ac->in(0)->as_ArrayCopy();
          }
        }
  

*** 1056,13 ***
      LoadNode* ld = clone_pinned();
      Node* addp = in(MemNode::Address)->clone();
      if (ac->as_ArrayCopy()->is_clonebasic()) {
        assert(ld_alloc != nullptr, "need an alloc");
        assert(addp->is_AddP(), "address must be addp");
!       BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
!       assert(bs->step_over_gc_barrier(addp->in(AddPNode::Base)) == bs->step_over_gc_barrier(ac->in(ArrayCopyNode::Dest)), "strange pattern");
-       assert(bs->step_over_gc_barrier(addp->in(AddPNode::Address)) == bs->step_over_gc_barrier(ac->in(ArrayCopyNode::Dest)), "strange pattern");
        addp->set_req(AddPNode::Base, src);
        addp->set_req(AddPNode::Address, src);
      } else {
        assert(ac->as_ArrayCopy()->is_arraycopy_validated() ||
               ac->as_ArrayCopy()->is_copyof_validated() ||
--- 1054,12 ---
      LoadNode* ld = clone_pinned();
      Node* addp = in(MemNode::Address)->clone();
      if (ac->as_ArrayCopy()->is_clonebasic()) {
        assert(ld_alloc != nullptr, "need an alloc");
        assert(addp->is_AddP(), "address must be addp");
!       assert(addp->in(AddPNode::Base) == ac->in(ArrayCopyNode::Dest), "strange pattern");
!       assert(addp->in(AddPNode::Address) == ac->in(ArrayCopyNode::Dest), "strange pattern");
        addp->set_req(AddPNode::Base, src);
        addp->set_req(AddPNode::Address, src);
      } else {
        assert(ac->as_ArrayCopy()->is_arraycopy_validated() ||
               ac->as_ArrayCopy()->is_copyof_validated() ||

*** 1242,12 ***
      // Load boxed value from result of valueOf() call is input parameter.
      if (this->is_Load() && ld_adr->is_AddP() &&
          (tp != nullptr) && tp->is_ptr_to_boxed_value()) {
        intptr_t ignore = 0;
        Node* base = AddPNode::Ideal_base_and_offset(ld_adr, phase, ignore);
-       BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
-       base = bs->step_over_gc_barrier(base);
        if (base != nullptr && base->is_Proj() &&
            base->as_Proj()->_con == TypeFunc::Parms &&
            base->in(0)->is_CallStaticJava() &&
            base->in(0)->as_CallStaticJava()->is_boxing_method()) {
          return base->in(0)->in(TypeFunc::Parms);
--- 1239,10 ---

*** 2523,16 ***
    Node*    base   = AddPNode::Ideal_base_and_offset(adr, phase, offset);
    if (base == nullptr)     return this;
    const TypeOopPtr* toop = phase->type(adr)->isa_oopptr();
    if (toop == nullptr)     return this;
  
-   // Step over potential GC barrier for OopHandle resolve
-   BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
-   if (bs->is_gc_barrier_node(base)) {
-     base = bs->step_over_gc_barrier(base);
-   }
- 
    // We can fetch the klass directly through an AllocateNode.
    // This works even if the klass is not constant (clone or newArray).
    if (offset == oopDesc::klass_offset_in_bytes()) {
      Node* allocated_klass = AllocateNode::Ideal_klass(base, phase);
      if (allocated_klass != nullptr) {
--- 2518,10 ---
< prev index next >