hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
changeset 31587 e48945b7849c
parent 30305 b92a97e1e9cb
child 31962 d05e0a4d1b43
equal deleted inserted replaced
31586:6e57742d1adb 31587:e48945b7849c
  3155       // shouldn't be parsed during the compilation, only the special
  3155       // shouldn't be parsed during the compilation, only the special
  3156       // Intrinsic node should be emitted.  If this isn't done the the
  3156       // Intrinsic node should be emitted.  If this isn't done the the
  3157       // code for the inlined version will be different than the root
  3157       // code for the inlined version will be different than the root
  3158       // compiled version which could lead to monotonicity problems on
  3158       // compiled version which could lead to monotonicity problems on
  3159       // intel.
  3159       // intel.
       
  3160       if (CheckIntrinsics && !scope->method()->intrinsic_candidate()) {
       
  3161         BAILOUT("failed to inline intrinsic, method not annotated");
       
  3162       }
  3160 
  3163 
  3161       // Set up a stream so that appending instructions works properly.
  3164       // Set up a stream so that appending instructions works properly.
  3162       ciBytecodeStream s(scope->method());
  3165       ciBytecodeStream s(scope->method());
  3163       s.reset_to_bci(0);
  3166       s.reset_to_bci(0);
  3164       scope_data()->set_stream(&s);
  3167       scope_data()->set_stream(&s);
  3195         // Specifically, if G1 is enabled, the value in the referent
  3198         // Specifically, if G1 is enabled, the value in the referent
  3196         // field is recorded by the G1 SATB pre barrier. This will
  3199         // field is recorded by the G1 SATB pre barrier. This will
  3197         // result in the referent being marked live and the reference
  3200         // result in the referent being marked live and the reference
  3198         // object removed from the list of discovered references during
  3201         // object removed from the list of discovered references during
  3199         // reference processing.
  3202         // reference processing.
       
  3203         if (CheckIntrinsics && !scope->method()->intrinsic_candidate()) {
       
  3204           BAILOUT("failed to inline intrinsic, method not annotated");
       
  3205         }
  3200 
  3206 
  3201         // Also we need intrinsic to prevent commoning reads from this field
  3207         // Also we need intrinsic to prevent commoning reads from this field
  3202         // across safepoint since GC can change its value.
  3208         // across safepoint since GC can change its value.
  3203 
  3209 
  3204         // Set up a stream so that appending instructions works properly.
  3210         // Set up a stream so that appending instructions works properly.
  3315   if (callee->is_method_handle_intrinsic()) {
  3321   if (callee->is_method_handle_intrinsic()) {
  3316     return try_method_handle_inline(callee);
  3322     return try_method_handle_inline(callee);
  3317   }
  3323   }
  3318 
  3324 
  3319   // handle intrinsics
  3325   // handle intrinsics
  3320   if (callee->intrinsic_id() != vmIntrinsics::_none) {
  3326   if (callee->intrinsic_id() != vmIntrinsics::_none &&
       
  3327       (CheckIntrinsics ? callee->intrinsic_candidate() : true)) {
  3321     if (try_inline_intrinsics(callee)) {
  3328     if (try_inline_intrinsics(callee)) {
  3322       print_inlining(callee, "intrinsic");
  3329       print_inlining(callee, "intrinsic");
  3323       return true;
  3330       return true;
  3324     }
  3331     }
  3325     // try normal inlining
  3332     // try normal inlining
  4276   ValueStack* state_before = copy_state_for_exception();
  4283   ValueStack* state_before = copy_state_for_exception();
  4277   ValueType* result_type = as_ValueType(callee->return_type());
  4284   ValueType* result_type = as_ValueType(callee->return_type());
  4278   assert(result_type->is_int(), "int result");
  4285   assert(result_type->is_int(), "int result");
  4279   Values* args = state()->pop_arguments(callee->arg_size());
  4286   Values* args = state()->pop_arguments(callee->arg_size());
  4280 
  4287 
  4281   // Pop off some args to speically handle, then push back
  4288   // Pop off some args to specially handle, then push back
  4282   Value newval = args->pop();
  4289   Value newval = args->pop();
  4283   Value cmpval = args->pop();
  4290   Value cmpval = args->pop();
  4284   Value offset = args->pop();
  4291   Value offset = args->pop();
  4285   Value src = args->pop();
  4292   Value src = args->pop();
  4286   Value unsafe_obj = args->pop();
  4293   Value unsafe_obj = args->pop();