< prev index next >

src/hotspot/share/opto/phaseX.cpp

Print this page
@@ -665,15 +665,11 @@
  
  
  
  //=============================================================================
  Node* PhaseGVN::apply_ideal(Node* k, bool can_reshape) {
-   Node* i = BarrierSet::barrier_set()->barrier_set_c2()->ideal_node(this, k, can_reshape);
-   if (i == nullptr) {
-     i = k->Ideal(this, can_reshape);
-   }
-   return i;
+   return k->Ideal(this, can_reshape);
  }
  
  //------------------------------transform--------------------------------------
  // Return a node which computes the same function as this node, but
  // in a faster or cheaper fashion.

@@ -2314,12 +2310,10 @@
                  }
                  assert(!(i < imax), "sanity");
                }
              } else if (dead->is_data_proj_of_pure_function(in)) {
                _worklist.push(in);
-             } else {
-               BarrierSet::barrier_set()->barrier_set_c2()->enqueue_useful_gc_barrier(this, in);
              }
              if (ReduceFieldZeroing && dead->is_Load() && i == MemNode::Memory &&
                  in->is_Proj() && in->in(0) != nullptr && in->in(0)->is_Initialize()) {
                // A Load that directly follows an InitializeNode is
                // going away. The Stores that follow are candidates

@@ -2697,28 +2691,16 @@
      InitializeNode* init = use->as_Initialize();
      init->for_each_proj(enqueue_init_mem_projs, TypeFunc::Memory);
    }
    // Loading the java mirror from a Klass requires two loads and the type
    // of the mirror load depends on the type of 'n'. See LoadNode::Value().
-   //   LoadBarrier?(LoadP(LoadP(AddP(foo:Klass, #java_mirror))))
-   BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
-   bool has_load_barrier_nodes = bs->has_load_barrier_nodes();
- 
+   //   LoadP(LoadP(AddP(foo:Klass, #java_mirror)))
    if (use_op == Op_LoadP && use->bottom_type()->isa_rawptr()) {
      for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
        Node* u = use->fast_out(i2);
        const Type* ut = u->bottom_type();
        if (u->Opcode() == Op_LoadP && ut->isa_instptr()) {
-         if (has_load_barrier_nodes) {
-           // Search for load barriers behind the load
-           for (DUIterator_Fast i3max, i3 = u->fast_outs(i3max); i3 < i3max; i3++) {
-             Node* b = u->fast_out(i3);
-             if (bs->is_gc_barrier_node(b)) {
-               worklist.push(b);
-             }
-           }
-         }
          worklist.push(u);
        }
      }
    }
    if (use->Opcode() == Op_OpaqueZeroTripGuard) {

@@ -3121,37 +3103,21 @@
  }
  
  // Loading the java mirror from a Klass requires two loads and the type of the mirror load depends on the type of 'n'.
  // See LoadNode::Value().
  void PhaseCCP::push_loadp(Unique_Node_List& worklist, const Node* use) const {
-   BarrierSetC2* barrier_set = BarrierSet::barrier_set()->barrier_set_c2();
-   bool has_load_barrier_nodes = barrier_set->has_load_barrier_nodes();
- 
    if (use->Opcode() == Op_LoadP && use->bottom_type()->isa_rawptr()) {
      for (DUIterator_Fast imax, i = use->fast_outs(imax); i < imax; i++) {
        Node* loadp = use->fast_out(i);
        const Type* ut = loadp->bottom_type();
        if (loadp->Opcode() == Op_LoadP && ut->isa_instptr() && ut != type(loadp)) {
-         if (has_load_barrier_nodes) {
-           // Search for load barriers behind the load
-           push_load_barrier(worklist, barrier_set, loadp);
-         }
          worklist.push(loadp);
        }
      }
    }
  }
  
- void PhaseCCP::push_load_barrier(Unique_Node_List& worklist, const BarrierSetC2* barrier_set, const Node* use) {
-   for (DUIterator_Fast imax, i = use->fast_outs(imax); i < imax; i++) {
-     Node* barrier_node = use->fast_out(i);
-     if (barrier_set->is_gc_barrier_node(barrier_node)) {
-       worklist.push(barrier_node);
-     }
-   }
- }
- 
  // AndI/L::Value() optimizes patterns similar to (v << 2) & 3, or CON & 3 to zero if they are bitwise disjoint.
  // Add the AndI/L nodes back to the worklist to re-apply Value() in case the value is now a constant or shift
  // value changed.
  void PhaseCCP::push_and(Unique_Node_List& worklist, const Node* parent, const Node* use) const {
    const TypeInteger* parent_type = type(parent)->isa_integer(type(parent)->basic_type());

@@ -3508,12 +3474,10 @@
        }
        break;
      default:
        break;
      }
- 
-     BarrierSet::barrier_set()->barrier_set_c2()->enqueue_useful_gc_barrier(igvn, old);
    }
  }
  
  void Node::set_req_X(uint i, Node *n, PhaseGVN *gvn) {
    PhaseIterGVN* igvn = gvn->is_IterGVN();
< prev index next >