src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
changeset 55679 aa96c53c592b
parent 55654 92ab031d6540
child 55692 64330bbb9be5
equal deleted inserted replaced
55678:296560a21cea 55679:aa96c53c592b
   295          call->as_CallLeaf()->entry_point() == CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_ref_field_pre_entry);
   295          call->as_CallLeaf()->entry_point() == CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_ref_field_pre_entry);
   296 }
   296 }
   297 
   297 
   298 bool ShenandoahBarrierSetC2::is_shenandoah_lrb_call(Node* call) {
   298 bool ShenandoahBarrierSetC2::is_shenandoah_lrb_call(Node* call) {
   299   return call->is_CallLeaf() &&
   299   return call->is_CallLeaf() &&
   300          call->as_CallLeaf()->entry_point() == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_JRT);
   300           call->as_CallLeaf()->entry_point() == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier);
   301 }
   301 }
   302 
   302 
   303 bool ShenandoahBarrierSetC2::is_shenandoah_marking_if(PhaseTransform *phase, Node* n) {
   303 bool ShenandoahBarrierSetC2::is_shenandoah_marking_if(PhaseTransform *phase, Node* n) {
   304   if (n->Opcode() != Op_If) {
   304   if (n->Opcode() != Op_If) {
   305     return false;
   305     return false;
   559     assert(access.is_oop(), "IN_NATIVE access only for oop values");
   559     assert(access.is_oop(), "IN_NATIVE access only for oop values");
   560     assert(access.is_parse_access(), "IN_NATIVE access only during parsing");
   560     assert(access.is_parse_access(), "IN_NATIVE access only during parsing");
   561     GraphKit* kit = static_cast<C2ParseAccess &>(access).kit();
   561     GraphKit* kit = static_cast<C2ParseAccess &>(access).kit();
   562     Node* call = kit->make_runtime_call(GraphKit::RC_LEAF,
   562     Node* call = kit->make_runtime_call(GraphKit::RC_LEAF,
   563                                         oop_load_from_native_barrier_Type(),
   563                                         oop_load_from_native_barrier_Type(),
   564                                         CAST_FROM_FN_PTR(address, ShenandoahRuntime::oop_load_from_native_barrier),
   564                                         CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_native),
   565                                         "ShenandoahRuntime::oop_load_from_native_barrier",
   565                                         "ShenandoahRuntime::load_reference_barrier_native",
   566                                         NULL, load);
   566                                         NULL, load);
   567     Node* proj = kit->gvn().transform(new ProjNode(call, TypeFunc::Parms+0));
   567     Node* proj = kit->gvn().transform(new ProjNode(call, TypeFunc::Parms+0));
   568     return kit->gvn().transform(new CheckCastPPNode(kit->control(), proj, load->bottom_type()));
   568     return kit->gvn().transform(new CheckCastPPNode(kit->control(), proj, load->bottom_type()));
   569   }
   569   }
   570 
   570 
   748   }
   748   }
   749 
   749 
   750   return strcmp(call->_name, "shenandoah_clone_barrier") == 0 ||
   750   return strcmp(call->_name, "shenandoah_clone_barrier") == 0 ||
   751          strcmp(call->_name, "shenandoah_cas_obj") == 0 ||
   751          strcmp(call->_name, "shenandoah_cas_obj") == 0 ||
   752          strcmp(call->_name, "shenandoah_wb_pre") == 0 ||
   752          strcmp(call->_name, "shenandoah_wb_pre") == 0 ||
   753          strcmp(call->_name, "ShenandoahRuntime::oop_load_from_native_barrier") == 0;
   753          strcmp(call->_name, "ShenandoahRuntime::load_reference_barrier_native") == 0;
   754 }
   754 }
   755 
   755 
   756 Node* ShenandoahBarrierSetC2::step_over_gc_barrier(Node* c) const {
   756 Node* ShenandoahBarrierSetC2::step_over_gc_barrier(Node* c) const {
   757   if (c->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
   757   if (c->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
   758     return c->in(ShenandoahLoadReferenceBarrierNode::ValueIn);
   758     return c->in(ShenandoahLoadReferenceBarrierNode::ValueIn);
  1181       break;
  1181       break;
  1182     case Op_ShenandoahLoadReferenceBarrier:
  1182     case Op_ShenandoahLoadReferenceBarrier:
  1183       conn_graph->add_local_var_and_edge(n, PointsToNode::NoEscape, n->in(ShenandoahLoadReferenceBarrierNode::ValueIn), delayed_worklist);
  1183       conn_graph->add_local_var_and_edge(n, PointsToNode::NoEscape, n->in(ShenandoahLoadReferenceBarrierNode::ValueIn), delayed_worklist);
  1184       return true;
  1184       return true;
  1185     case Op_CallLeaf:
  1185     case Op_CallLeaf:
  1186       if (strcmp(n->as_CallLeaf()->_name, "ShenandoahRuntime::oop_load_from_native_barrier") == 0) {
  1186       if (strcmp(n->as_CallLeaf()->_name, "ShenandoahRuntime::load_reference_barrier_native") == 0) {
  1187         conn_graph->map_ideal_node(n, conn_graph->phantom_obj);
  1187         conn_graph->map_ideal_node(n, conn_graph->phantom_obj);
  1188         return true;
  1188         return true;
  1189       }
  1189       }
  1190     default:
  1190     default:
  1191       // Nothing
  1191       // Nothing