< prev index next >

src/hotspot/share/opto/callGenerator.cpp

Print this page

1194                                             call_does_dispatch, vtable_index, // out-parameters
1195                                             false /* check_access */);
1196           // We lack profiling at this call but type speculation may
1197           // provide us with a type
1198           speculative_receiver_type = (receiver_type != NULL) ? receiver_type->speculative_type() : NULL;
1199         }
1200         CallGenerator* cg = C->call_generator(target, vtable_index, call_does_dispatch, jvms,
1201                                               allow_inline,
1202                                               PROB_ALWAYS,
1203                                               speculative_receiver_type);
1204         return cg;
1205       } else {
1206         print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(),
1207                                "member_name not constant");
1208       }
1209     }
1210     break;
1211 
1212     case vmIntrinsics::_linkToNative:
1213     {
1214       Node* addr_n = kit.argument(1); // target address
1215       Node* nep_n = kit.argument(callee->arg_size() - 1); // NativeEntryPoint
1216       // This check needs to be kept in sync with the one in CallStaticJavaNode::Ideal
1217       if (addr_n->Opcode() == Op_ConL && nep_n->Opcode() == Op_ConP) {
1218         input_not_const = false;
1219         const TypeLong* addr_t = addr_n->bottom_type()->is_long();
1220         const TypeOopPtr* nep_t = nep_n->bottom_type()->is_oopptr();
1221         address addr = (address) addr_t->get_con();
1222         ciNativeEntryPoint* nep = nep_t->const_oop()->as_native_entry_point();
1223         return new NativeCallGenerator(callee, addr, nep);









1224       } else {
1225         print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(),
1226                                "NativeEntryPoint not constant");
1227       }
1228     }
1229     break;
1230 
1231   default:
1232     fatal("unexpected intrinsic %d: %s", vmIntrinsics::as_int(iid), vmIntrinsics::name_at(iid));
1233     break;
1234   }
1235   return NULL;
1236 }
1237 
1238 
1239 //------------------------PredicatedIntrinsicGenerator------------------------------
1240 // Internal class which handles all predicated Intrinsic calls.
1241 class PredicatedIntrinsicGenerator : public CallGenerator {
1242   CallGenerator* _intrinsic;
1243   CallGenerator* _cg;
1244 
1245 public:
1246   PredicatedIntrinsicGenerator(CallGenerator* intrinsic,

1194                                             call_does_dispatch, vtable_index, // out-parameters
1195                                             false /* check_access */);
1196           // We lack profiling at this call but type speculation may
1197           // provide us with a type
1198           speculative_receiver_type = (receiver_type != NULL) ? receiver_type->speculative_type() : NULL;
1199         }
1200         CallGenerator* cg = C->call_generator(target, vtable_index, call_does_dispatch, jvms,
1201                                               allow_inline,
1202                                               PROB_ALWAYS,
1203                                               speculative_receiver_type);
1204         return cg;
1205       } else {
1206         print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(),
1207                                "member_name not constant");
1208       }
1209     }
1210     break;
1211 
1212     case vmIntrinsics::_linkToNative:
1213     {
1214       Node* addr_n = kit.argument(0); // target address
1215       Node* nep_n = kit.argument(callee->arg_size() - 1); // NativeEntryPoint
1216       // This check needs to be kept in sync with the one in CallStaticJavaNode::Ideal
1217       if (addr_n->Opcode() == Op_ConL && nep_n->Opcode() == Op_ConP) {
1218         input_not_const = false;
1219 
1220         const TypeOopPtr* nep_t = nep_n->bottom_type()->is_oopptr();

1221         ciNativeEntryPoint* nep = nep_t->const_oop()->as_native_entry_point();
1222 
1223         if (!nep->need_transition()) {
1224           const TypeLong* addr_t = addr_n->bottom_type()->is_long();
1225           address addr = (address) addr_t->get_con();
1226 
1227           return new NativeCallGenerator(callee, addr, nep);
1228         } else {
1229           print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(),
1230                         "Not inlining non-trivial call");
1231         }
1232       } else {
1233         print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(),
1234                                "NativeEntryPoint or address not constant");
1235       }
1236     }
1237     break;
1238 
1239   default:
1240     fatal("unexpected intrinsic %d: %s", vmIntrinsics::as_int(iid), vmIntrinsics::name_at(iid));
1241     break;
1242   }
1243   return NULL;
1244 }
1245 
1246 
1247 //------------------------PredicatedIntrinsicGenerator------------------------------
1248 // Internal class which handles all predicated Intrinsic calls.
1249 class PredicatedIntrinsicGenerator : public CallGenerator {
1250   CallGenerator* _intrinsic;
1251   CallGenerator* _cg;
1252 
1253 public:
1254   PredicatedIntrinsicGenerator(CallGenerator* intrinsic,
< prev index next >