equal
deleted
inserted
replaced
2097 return false; |
2097 return false; |
2098 |
2098 |
2099 if (!_head->is_CountedLoop()) |
2099 if (!_head->is_CountedLoop()) |
2100 return false; // Dead loop |
2100 return false; // Dead loop |
2101 CountedLoopNode *cl = _head->as_CountedLoop(); |
2101 CountedLoopNode *cl = _head->as_CountedLoop(); |
2102 if (!cl->loopexit()) |
2102 if (!cl->is_valid_counted_loop()) |
2103 return false; // Malformed loop |
2103 return false; // Malformed loop |
2104 if (!phase->is_member(this, phase->get_ctrl(cl->loopexit()->in(CountedLoopEndNode::TestValue)))) |
2104 if (!phase->is_member(this, phase->get_ctrl(cl->loopexit()->in(CountedLoopEndNode::TestValue)))) |
2105 return false; // Infinite loop |
2105 return false; // Infinite loop |
2106 |
2106 |
2107 #ifdef ASSERT |
2107 #ifdef ASSERT |
2253 } |
2253 } |
2254 return true; |
2254 return true; |
2255 } |
2255 } |
2256 CountedLoopNode *cl = _head->as_CountedLoop(); |
2256 CountedLoopNode *cl = _head->as_CountedLoop(); |
2257 |
2257 |
2258 if (!cl->loopexit()) return true; // Ignore various kinds of broken loops |
2258 if (!cl->is_valid_counted_loop()) return true; // Ignore various kinds of broken loops |
2259 |
2259 |
2260 // Do nothing special to pre- and post- loops |
2260 // Do nothing special to pre- and post- loops |
2261 if (cl->is_pre_loop() || cl->is_post_loop()) return true; |
2261 if (cl->is_pre_loop() || cl->is_post_loop()) return true; |
2262 |
2262 |
2263 // Compute loop trip count from profile data |
2263 // Compute loop trip count from profile data |
2634 return false; |
2634 return false; |
2635 } |
2635 } |
2636 |
2636 |
2637 // Must have constant stride |
2637 // Must have constant stride |
2638 CountedLoopNode* head = lpt->_head->as_CountedLoop(); |
2638 CountedLoopNode* head = lpt->_head->as_CountedLoop(); |
2639 if (!head->stride_is_con() || !head->is_normal_loop()) { |
2639 if (!head->is_valid_counted_loop() || !head->is_normal_loop()) { |
2640 return false; |
2640 return false; |
2641 } |
2641 } |
2642 |
2642 |
2643 // Check that the body only contains a store of a loop invariant |
2643 // Check that the body only contains a store of a loop invariant |
2644 // value that is indexed by the loop phi. |
2644 // value that is indexed by the loop phi. |