Mercurial > hg > graal-compiler
comparison src/share/vm/opto/loopopts.cpp @ 3281:273b56978029
7039586: test/java/util/Collections/Rotate.java failing with hs21-b09
Summary: A predicate should not be moved in partial peel optimization since it will invalidate jvm state of its uncommon trap.
Reviewed-by: never
author | kvn |
---|---|
date | Tue, 26 Apr 2011 12:14:22 -0700 |
parents | 6c97c830fb6f |
children | 4e761e7e6e12 |
comparison
equal
deleted
inserted
replaced
3280:548597e74aa4 | 3281:273b56978029 |
---|---|
2260 // final graph | 2260 // final graph |
2261 // | 2261 // |
2262 // stmt1 | 2262 // stmt1 |
2263 // | | 2263 // | |
2264 // v | 2264 // v |
2265 // loop predicate | |
2266 // | | |
2267 // v | |
2265 // stmt2 clone | 2268 // stmt2 clone |
2266 // | | 2269 // | |
2267 // v | 2270 // v |
2268 // ........> ifA clone | 2271 // ........> ifA clone |
2269 // : / | | 2272 // : / | |
2270 // dom / | | 2273 // dom / | |
2271 // : v v | 2274 // : v v |
2272 // : false true | 2275 // : false true |
2273 // : | | | |
2274 // : | v | |
2275 // : | loop predicate | |
2276 // : | | | 2276 // : | | |
2277 // : | v | 2277 // : | v |
2278 // : | newloop<-----+ | 2278 // : | newloop<-----+ |
2279 // : | | | | 2279 // : | | | |
2280 // : | stmt3 clone | | 2280 // : | stmt3 clone | |
2328 #endif | 2328 #endif |
2329 return false; | 2329 return false; |
2330 } | 2330 } |
2331 } | 2331 } |
2332 | 2332 |
2333 Node* entry = head->in(LoopNode::EntryControl); | |
2334 int dd = dom_depth(head); | 2333 int dd = dom_depth(head); |
2335 | 2334 |
2336 // Step 1: find cut point | 2335 // Step 1: find cut point |
2337 | 2336 |
2338 // Walk up dominators to loop head looking for first loop exit | 2337 // Walk up dominators to loop head looking for first loop exit |
2625 } | 2624 } |
2626 } | 2625 } |
2627 | 2626 |
2628 // Backedge of the surviving new_head (the clone) is original last_peel | 2627 // Backedge of the surviving new_head (the clone) is original last_peel |
2629 _igvn.hash_delete(new_head_clone); | 2628 _igvn.hash_delete(new_head_clone); |
2630 Node* new_entry = move_loop_predicates(entry, new_head_clone->in(LoopNode::EntryControl)); | |
2631 new_head_clone->set_req(LoopNode::EntryControl, new_entry); | |
2632 new_head_clone->set_req(LoopNode::LoopBackControl, last_peel); | 2629 new_head_clone->set_req(LoopNode::LoopBackControl, last_peel); |
2633 _igvn._worklist.push(new_head_clone); | 2630 _igvn._worklist.push(new_head_clone); |
2634 | 2631 |
2635 // Cut first node in original not_peel set | 2632 // Cut first node in original not_peel set |
2636 _igvn.hash_delete(new_head); | 2633 _igvn.hash_delete(new_head); |