< prev index next >

src/hotspot/share/opto/loopTransform.cpp

Print this page




1183   register_new_node(frame, C->start());
1184   // It's impossible for the predicate to fail at runtime. Use an Halt node.
1185   Node* halt = new HaltNode(other_proj, frame);
1186   C->root()->add_req(halt);
1187   new_iff->set_req(0, prev_proj);
1188 
1189   register_control(new_iff, outer_loop->_parent, prev_proj);
1190   register_control(proj, outer_loop->_parent, new_iff);
1191   register_control(other_proj, _ltree_root, new_iff);
1192   register_control(halt, _ltree_root, other_proj);
1193   return proj;
1194 }
1195 
1196 void PhaseIdealLoop::duplicate_predicates(CountedLoopNode* pre_head, Node* castii, IdealLoopTree* outer_loop,
1197                                           LoopNode* outer_main_head, uint dd_main_head) {
1198   if (UseLoopPredicate) {
1199     Node* entry = pre_head->in(LoopNode::EntryControl);
1200     Node* predicate = NULL;
1201     predicate = find_predicate_insertion_point(entry, Deoptimization::Reason_loop_limit_check);
1202     if (predicate != NULL) {
1203       entry = entry->in(0)->in(0);
1204     }
1205     Node* profile_predicate = NULL;
1206     if (UseProfiledLoopPredicate) {
1207       profile_predicate = find_predicate_insertion_point(entry, Deoptimization::Reason_profile_predicate);
1208       if (profile_predicate != NULL) {
1209         entry = skip_loop_predicates(entry);
1210       }
1211     }
1212     predicate = find_predicate_insertion_point(entry, Deoptimization::Reason_predicate);
1213     duplicate_predicates_helper(predicate, castii, outer_loop, outer_main_head, dd_main_head);
1214     duplicate_predicates_helper(profile_predicate, castii, outer_loop, outer_main_head, dd_main_head);
1215   }
1216 }
1217 
1218 //------------------------------insert_pre_post_loops--------------------------
1219 // Insert pre and post loops.  If peel_only is set, the pre-loop can not have
1220 // more iterations added.  It acts as a 'peel' only, no lower-bound RCE, no
1221 // alignment.  Useful to unroll loops that do no array accesses.
1222 void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_new, bool peel_only ) {
1223 




1183   register_new_node(frame, C->start());
1184   // It's impossible for the predicate to fail at runtime. Use an Halt node.
1185   Node* halt = new HaltNode(other_proj, frame);
1186   C->root()->add_req(halt);
1187   new_iff->set_req(0, prev_proj);
1188 
1189   register_control(new_iff, outer_loop->_parent, prev_proj);
1190   register_control(proj, outer_loop->_parent, new_iff);
1191   register_control(other_proj, _ltree_root, new_iff);
1192   register_control(halt, _ltree_root, other_proj);
1193   return proj;
1194 }
1195 
1196 void PhaseIdealLoop::duplicate_predicates(CountedLoopNode* pre_head, Node* castii, IdealLoopTree* outer_loop,
1197                                           LoopNode* outer_main_head, uint dd_main_head) {
1198   if (UseLoopPredicate) {
1199     Node* entry = pre_head->in(LoopNode::EntryControl);
1200     Node* predicate = NULL;
1201     predicate = find_predicate_insertion_point(entry, Deoptimization::Reason_loop_limit_check);
1202     if (predicate != NULL) {
1203       entry = skip_loop_predicates(entry);
1204     }
1205     Node* profile_predicate = NULL;
1206     if (UseProfiledLoopPredicate) {
1207       profile_predicate = find_predicate_insertion_point(entry, Deoptimization::Reason_profile_predicate);
1208       if (profile_predicate != NULL) {
1209         entry = skip_loop_predicates(entry);
1210       }
1211     }
1212     predicate = find_predicate_insertion_point(entry, Deoptimization::Reason_predicate);
1213     duplicate_predicates_helper(predicate, castii, outer_loop, outer_main_head, dd_main_head);
1214     duplicate_predicates_helper(profile_predicate, castii, outer_loop, outer_main_head, dd_main_head);
1215   }
1216 }
1217 
1218 //------------------------------insert_pre_post_loops--------------------------
1219 // Insert pre and post loops.  If peel_only is set, the pre-loop can not have
1220 // more iterations added.  It acts as a 'peel' only, no lower-bound RCE, no
1221 // alignment.  Useful to unroll loops that do no array accesses.
1222 void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_new, bool peel_only ) {
1223 


< prev index next >