< prev index next >

src/hotspot/share/opto/callGenerator.cpp

Print this page




1119   //        do_intrinsic(0)
1120   //    else
1121   //    if (predicate(1))
1122   //        do_intrinsic(1)
1123   //    ...
1124   //    else
1125   //        do_java_comp
1126 
1127   GraphKit kit(jvms);
1128   PhaseGVN& gvn = kit.gvn();
1129 
1130   CompileLog* log = kit.C->log();
1131   if (log != NULL) {
1132     log->elem("predicated_intrinsic bci='%d' method='%d'",
1133               jvms->bci(), log->identify(method()));
1134   }
1135 
1136   if (!method()->is_static()) {
1137     // We need an explicit receiver null_check before checking its type in predicate.
1138     // We share a map with the caller, so his JVMS gets adjusted.
1139     Node* receiver = kit.null_check_receiver_before_call(method());
1140     if (kit.stopped()) {
1141       return kit.transfer_exceptions_into_jvms();
1142     }
1143   }
1144 
1145   int n_predicates = _intrinsic->predicates_count();
1146   assert(n_predicates > 0, "sanity");
1147 
1148   JVMState** result_jvms = NEW_RESOURCE_ARRAY(JVMState*, (n_predicates+1));
1149 
1150   // Region for normal compilation code if intrinsic failed.
1151   Node* slow_region = new RegionNode(1);
1152 
1153   int results = 0;
1154   for (int predicate = 0; (predicate < n_predicates) && !kit.stopped(); predicate++) {
1155 #ifdef ASSERT
1156     JVMState* old_jvms = kit.jvms();
1157     SafePointNode* old_map = kit.map();
1158     Node* old_io  = old_map->i_o();
1159     Node* old_mem = old_map->memory();




1119   //        do_intrinsic(0)
1120   //    else
1121   //    if (predicate(1))
1122   //        do_intrinsic(1)
1123   //    ...
1124   //    else
1125   //        do_java_comp
1126 
1127   GraphKit kit(jvms);
1128   PhaseGVN& gvn = kit.gvn();
1129 
1130   CompileLog* log = kit.C->log();
1131   if (log != NULL) {
1132     log->elem("predicated_intrinsic bci='%d' method='%d'",
1133               jvms->bci(), log->identify(method()));
1134   }
1135 
1136   if (!method()->is_static()) {
1137     // We need an explicit receiver null_check before checking its type in predicate.
1138     // We share a map with the caller, so his JVMS gets adjusted.
1139     kit.null_check_receiver_before_call(method());
1140     if (kit.stopped()) {
1141       return kit.transfer_exceptions_into_jvms();
1142     }
1143   }
1144 
1145   int n_predicates = _intrinsic->predicates_count();
1146   assert(n_predicates > 0, "sanity");
1147 
1148   JVMState** result_jvms = NEW_RESOURCE_ARRAY(JVMState*, (n_predicates+1));
1149 
1150   // Region for normal compilation code if intrinsic failed.
1151   Node* slow_region = new RegionNode(1);
1152 
1153   int results = 0;
1154   for (int predicate = 0; (predicate < n_predicates) && !kit.stopped(); predicate++) {
1155 #ifdef ASSERT
1156     JVMState* old_jvms = kit.jvms();
1157     SafePointNode* old_map = kit.map();
1158     Node* old_io  = old_map->i_o();
1159     Node* old_mem = old_map->memory();


< prev index next >