< prev index next >

src/hotspot/share/opto/escape.cpp

Print this page
*** 1504,15 ***
    PointsToNode* n_ptn = ptnode_adr(n_idx);
    if (n_ptn != nullptr) {
      return; // No need to redefine PointsTo node during first iteration.
    }
    int opcode = n->Opcode();
-   bool gc_handled = BarrierSet::barrier_set()->barrier_set_c2()->escape_add_to_con_graph(this, igvn, delayed_worklist, n, opcode);
-   if (gc_handled) {
-     return; // Ignore node if already handled by GC.
-   }
- 
    if (n->is_Call()) {
      // Arguments to allocation and locking don't escape.
      if (n->is_AbstractLock()) {
        // Put Lock and Unlock nodes on IGVN worklist to process them during
        // first IGVN optimization when escape information is still available.
--- 1504,10 ---

*** 1726,14 ***
    }
    assert(n->is_Store() || n->is_LoadStore() ||
           ((n_ptn != nullptr) && (n_ptn->ideal_node() != nullptr)),
           "node should be registered already");
    int opcode = n->Opcode();
-   bool gc_handled = BarrierSet::barrier_set()->barrier_set_c2()->escape_add_final_edges(this, _igvn, n, opcode);
-   if (gc_handled) {
-     return; // Ignore node if already handled by GC.
-   }
    switch (opcode) {
      case Op_AddP: {
        Node* base = get_addp_base(n);
        PointsToNode* ptn_base = ptnode_adr(base->_idx);
        assert(ptn_base != nullptr, "field's base should be registered");
--- 1721,10 ---

*** 3454,12 ***
          bt = field->layout_type();
        } else {
          // Check for unsafe oop field access
          if (n->has_out_with(Op_StoreP, Op_LoadP, Op_StoreN, Op_LoadN) ||
              n->has_out_with(Op_GetAndSetP, Op_GetAndSetN, Op_CompareAndExchangeP, Op_CompareAndExchangeN) ||
!             n->has_out_with(Op_CompareAndSwapP, Op_CompareAndSwapN, Op_WeakCompareAndSwapP, Op_WeakCompareAndSwapN) ||
-             BarrierSet::barrier_set()->barrier_set_c2()->escape_has_out_with_unsafe_object(n)) {
            bt = T_OBJECT;
            (*unsafe) = true;
          }
        }
      } else if (adr_type->isa_aryptr()) {
--- 3445,11 ---
          bt = field->layout_type();
        } else {
          // Check for unsafe oop field access
          if (n->has_out_with(Op_StoreP, Op_LoadP, Op_StoreN, Op_LoadN) ||
              n->has_out_with(Op_GetAndSetP, Op_GetAndSetN, Op_CompareAndExchangeP, Op_CompareAndExchangeN) ||
!             n->has_out_with(Op_CompareAndSwapP, Op_CompareAndSwapN, Op_WeakCompareAndSwapP, Op_WeakCompareAndSwapN)) {
            bt = T_OBJECT;
            (*unsafe) = true;
          }
        }
      } else if (adr_type->isa_aryptr()) {

*** 3473,12 ***
        }
      } else if (adr_type->isa_rawptr() || adr_type->isa_klassptr()) {
        // Allocation initialization, ThreadLocal field access, unsafe access
        if (n->has_out_with(Op_StoreP, Op_LoadP, Op_StoreN, Op_LoadN) ||
            n->has_out_with(Op_GetAndSetP, Op_GetAndSetN, Op_CompareAndExchangeP, Op_CompareAndExchangeN) ||
!           n->has_out_with(Op_CompareAndSwapP, Op_CompareAndSwapN, Op_WeakCompareAndSwapP, Op_WeakCompareAndSwapN) ||
-           BarrierSet::barrier_set()->barrier_set_c2()->escape_has_out_with_unsafe_object(n)) {
          bt = T_OBJECT;
        }
      }
    }
    // Note: T_NARROWOOP is not classed as a real reference type
--- 3463,11 ---
        }
      } else if (adr_type->isa_rawptr() || adr_type->isa_klassptr()) {
        // Allocation initialization, ThreadLocal field access, unsafe access
        if (n->has_out_with(Op_StoreP, Op_LoadP, Op_StoreN, Op_LoadN) ||
            n->has_out_with(Op_GetAndSetP, Op_GetAndSetN, Op_CompareAndExchangeP, Op_CompareAndExchangeN) ||
!           n->has_out_with(Op_CompareAndSwapP, Op_CompareAndSwapN, Op_WeakCompareAndSwapP, Op_WeakCompareAndSwapN)) {
          bt = T_OBJECT;
        }
      }
    }
    // Note: T_NARROWOOP is not classed as a real reference type

*** 4153,13 ***
          if (alloc == nullptr || alloc->_idx != (uint)toop->instance_id()) {
            result = proj_in->in(TypeFunc::Memory);
          }
        } else if (proj_in->is_MemBar()) {
          // Check if there is an array copy for a clone
!         // 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(proj_in->in(0));
  
          if (control_proj_ac->is_Proj() && control_proj_ac->in(0)->is_ArrayCopy()) {
            // Stop if it is a clone
            ArrayCopyNode* ac = control_proj_ac->in(0)->as_ArrayCopy();
            if (ac->may_modify(toop, igvn)) {
--- 4142,11 ---
          if (alloc == nullptr || alloc->_idx != (uint)toop->instance_id()) {
            result = proj_in->in(TypeFunc::Memory);
          }
        } else if (proj_in->is_MemBar()) {
          // Check if there is an array copy for a clone
!         Node* control_proj_ac = proj_in->in(0);
  
          if (control_proj_ac->is_Proj() && control_proj_ac->in(0)->is_ArrayCopy()) {
            // Stop if it is a clone
            ArrayCopyNode* ac = control_proj_ac->in(0)->as_ArrayCopy();
            if (ac->may_modify(toop, igvn)) {
< prev index next >