< prev index next >

src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp

Print this page
rev 55887 : 822900: Shenandoah: Missing node types in ShenandoahLoadReferenceBarrier::needs_barrier_impl()


3070         if (needs_barrier_impl(phase, n->in(i), visited)) return true;
3071       }
3072       return false;
3073     }
3074     case Op_CheckCastPP:
3075     case Op_CastPP:
3076       return needs_barrier_impl(phase, n->in(1), visited);
3077     case Op_Proj:
3078       return needs_barrier_impl(phase, n->in(0), visited);
3079     case Op_ShenandoahLoadReferenceBarrier:
3080       // tty->print_cr("optimize barrier on barrier");
3081       return false;
3082     case Op_Parm:
3083       // tty->print_cr("optimize barrier on input arg");
3084       return false;
3085     case Op_DecodeN:
3086     case Op_EncodeP:
3087       return needs_barrier_impl(phase, n->in(1), visited);
3088     case Op_LoadN:
3089       return true;

3090     case Op_CMoveP:
3091       return needs_barrier_impl(phase, n->in(2), visited) ||
3092              needs_barrier_impl(phase, n->in(3), visited);
3093     case Op_ShenandoahEnqueueBarrier:
3094       return needs_barrier_impl(phase, n->in(1), visited);
3095     default:
3096       break;
3097   }
3098 #ifdef ASSERT
3099   tty->print("need barrier on?: ");
3100   tty->print_cr("ins:");
3101   n->dump(2);
3102   tty->print_cr("outs:");
3103   n->dump(-2);
3104   ShouldNotReachHere();
3105 #endif
3106   return true;
3107 }
3108 
3109 ShenandoahLoadReferenceBarrierNode::Strength ShenandoahLoadReferenceBarrierNode::get_barrier_strength() {


3221           // Leave strength as is.
3222         } else {
3223           strength = WEAK;
3224         }
3225         break;
3226       }
3227       case Op_AryEq: {
3228         Node* n1 = n->in(2);
3229         Node* n2 = n->in(3);
3230         if (!ShenandoahOptimizeStableFinals ||
3231             !n1->bottom_type()->isa_aryptr() || !n1->bottom_type()->isa_aryptr()->is_stable() ||
3232             !n2->bottom_type()->isa_aryptr() || !n2->bottom_type()->isa_aryptr()->is_stable()) {
3233           strength = WEAK;
3234         }
3235         break;
3236       }
3237       case Op_StrEquals:
3238       case Op_StrComp:
3239       case Op_StrIndexOf:
3240       case Op_StrIndexOfChar:

3241         if (!ShenandoahOptimizeStableFinals) {
3242            strength = WEAK;
3243         }
3244         break;
3245       case Op_Conv2B:
3246       case Op_LoadRange:
3247       case Op_LoadKlass:
3248       case Op_LoadNKlass:
3249         // NONE, i.e. leave current strength as is
3250         break;
3251       case Op_AddP:
3252       case Op_CheckCastPP:
3253       case Op_CastPP:
3254       case Op_CMoveP:
3255       case Op_Phi:
3256       case Op_ShenandoahLoadReferenceBarrier:
3257         visit_users = true;
3258         break;
3259       default: {
3260 #ifdef ASSERT




3070         if (needs_barrier_impl(phase, n->in(i), visited)) return true;
3071       }
3072       return false;
3073     }
3074     case Op_CheckCastPP:
3075     case Op_CastPP:
3076       return needs_barrier_impl(phase, n->in(1), visited);
3077     case Op_Proj:
3078       return needs_barrier_impl(phase, n->in(0), visited);
3079     case Op_ShenandoahLoadReferenceBarrier:
3080       // tty->print_cr("optimize barrier on barrier");
3081       return false;
3082     case Op_Parm:
3083       // tty->print_cr("optimize barrier on input arg");
3084       return false;
3085     case Op_DecodeN:
3086     case Op_EncodeP:
3087       return needs_barrier_impl(phase, n->in(1), visited);
3088     case Op_LoadN:
3089       return true;
3090     case Op_CMoveN:
3091     case Op_CMoveP:
3092       return needs_barrier_impl(phase, n->in(2), visited) ||
3093              needs_barrier_impl(phase, n->in(3), visited);
3094     case Op_ShenandoahEnqueueBarrier:
3095       return needs_barrier_impl(phase, n->in(1), visited);
3096     default:
3097       break;
3098   }
3099 #ifdef ASSERT
3100   tty->print("need barrier on?: ");
3101   tty->print_cr("ins:");
3102   n->dump(2);
3103   tty->print_cr("outs:");
3104   n->dump(-2);
3105   ShouldNotReachHere();
3106 #endif
3107   return true;
3108 }
3109 
3110 ShenandoahLoadReferenceBarrierNode::Strength ShenandoahLoadReferenceBarrierNode::get_barrier_strength() {


3222           // Leave strength as is.
3223         } else {
3224           strength = WEAK;
3225         }
3226         break;
3227       }
3228       case Op_AryEq: {
3229         Node* n1 = n->in(2);
3230         Node* n2 = n->in(3);
3231         if (!ShenandoahOptimizeStableFinals ||
3232             !n1->bottom_type()->isa_aryptr() || !n1->bottom_type()->isa_aryptr()->is_stable() ||
3233             !n2->bottom_type()->isa_aryptr() || !n2->bottom_type()->isa_aryptr()->is_stable()) {
3234           strength = WEAK;
3235         }
3236         break;
3237       }
3238       case Op_StrEquals:
3239       case Op_StrComp:
3240       case Op_StrIndexOf:
3241       case Op_StrIndexOfChar:
3242       case Op_HasNegatives:
3243         if (!ShenandoahOptimizeStableFinals) {
3244            strength = WEAK;
3245         }
3246         break;
3247       case Op_Conv2B:
3248       case Op_LoadRange:
3249       case Op_LoadKlass:
3250       case Op_LoadNKlass:
3251         // NONE, i.e. leave current strength as is
3252         break;
3253       case Op_AddP:
3254       case Op_CheckCastPP:
3255       case Op_CastPP:
3256       case Op_CMoveP:
3257       case Op_Phi:
3258       case Op_ShenandoahLoadReferenceBarrier:
3259         visit_users = true;
3260         break;
3261       default: {
3262 #ifdef ASSERT


< prev index next >