equal
deleted
inserted
replaced
1156 |
1156 |
1157 // failed |
1157 // failed |
1158 return NULL; |
1158 return NULL; |
1159 } |
1159 } |
1160 |
1160 |
1161 LoopNode* CountedLoopNode::skip_strip_mined(int expect_opaq) { |
1161 LoopNode* CountedLoopNode::skip_strip_mined(int expect_skeleton) { |
1162 if (is_strip_mined()) { |
1162 if (is_strip_mined()) { |
1163 verify_strip_mined(expect_opaq); |
1163 verify_strip_mined(expect_skeleton); |
1164 return in(EntryControl)->as_Loop(); |
1164 return in(EntryControl)->as_Loop(); |
1165 } |
1165 } |
1166 return this; |
1166 return this; |
1167 } |
1167 } |
1168 |
1168 |
1248 LoopNode* l = outer_loop(); |
1248 LoopNode* l = outer_loop(); |
1249 if (l == NULL) { |
1249 if (l == NULL) { |
1250 return NULL; |
1250 return NULL; |
1251 } |
1251 } |
1252 return l->outer_safepoint(); |
1252 return l->outer_safepoint(); |
|
1253 } |
|
1254 |
|
1255 Node* CountedLoopNode::skip_predicates() { |
|
1256 if (is_main_loop()) { |
|
1257 Node* ctrl = skip_strip_mined()->in(LoopNode::EntryControl); |
|
1258 while (ctrl != NULL && ctrl->is_Proj() && ctrl->in(0)->is_If() && |
|
1259 ctrl->in(0)->as_If()->proj_out(1-ctrl->as_Proj()->_con)->outcnt() == 1 && |
|
1260 ctrl->in(0)->as_If()->proj_out(1-ctrl->as_Proj()->_con)->unique_out()->Opcode() == Op_Halt) { |
|
1261 ctrl = ctrl->in(0)->in(0); |
|
1262 } |
|
1263 |
|
1264 return ctrl; |
|
1265 } |
|
1266 return in(LoopNode::EntryControl); |
1253 } |
1267 } |
1254 |
1268 |
1255 void OuterStripMinedLoopNode::adjust_strip_mined_loop(PhaseIterGVN* igvn) { |
1269 void OuterStripMinedLoopNode::adjust_strip_mined_loop(PhaseIterGVN* igvn) { |
1256 // Look for the outer & inner strip mined loop, reduce number of |
1270 // Look for the outer & inner strip mined loop, reduce number of |
1257 // iterations of the inner loop, set exit condition of outer loop, |
1271 // iterations of the inner loop, set exit condition of outer loop, |
3768 // be guaranteed anymore. |
3782 // be guaranteed anymore. |
3769 bool PhaseIdealLoop::is_canonical_loop_entry(CountedLoopNode* cl) { |
3783 bool PhaseIdealLoop::is_canonical_loop_entry(CountedLoopNode* cl) { |
3770 if (!cl->is_main_loop() && !cl->is_post_loop()) { |
3784 if (!cl->is_main_loop() && !cl->is_post_loop()) { |
3771 return false; |
3785 return false; |
3772 } |
3786 } |
3773 Node* ctrl = cl->skip_strip_mined()->in(LoopNode::EntryControl); |
3787 Node* ctrl = cl->skip_predicates(); |
|
3788 |
3774 if (ctrl == NULL || (!ctrl->is_IfTrue() && !ctrl->is_IfFalse())) { |
3789 if (ctrl == NULL || (!ctrl->is_IfTrue() && !ctrl->is_IfFalse())) { |
3775 return false; |
3790 return false; |
3776 } |
3791 } |
3777 Node* iffm = ctrl->in(0); |
3792 Node* iffm = ctrl->in(0); |
3778 if (iffm == NULL || !iffm->is_If()) { |
3793 if (iffm == NULL || !iffm->is_If()) { |