comparison src/share/vm/opto/loopTransform.cpp @ 3845:c96c3eb1efae

7068051: SIGSEGV in PhaseIdealLoop::build_loop_late_post Summary: Removed predicate cloning from loop peeling optimization and from split fall-in paths. Reviewed-by: never
author kvn
date Fri, 29 Jul 2011 09:16:29 -0700
parents e3cbc9ddd434
children 6987871cfb9b
comparison
equal deleted inserted replaced
3844:ce3e1d4dc416 3845:c96c3eb1efae
507 // Do this by making the old-loop fall-in edges act as if they came 507 // Do this by making the old-loop fall-in edges act as if they came
508 // around the loopback from the prior iteration (follow the old-loop 508 // around the loopback from the prior iteration (follow the old-loop
509 // backedges) and then map to the new peeled iteration. This leaves 509 // backedges) and then map to the new peeled iteration. This leaves
510 // the pre-loop with only 1 user (the new peeled iteration), but the 510 // the pre-loop with only 1 user (the new peeled iteration), but the
511 // peeled-loop backedge has 2 users. 511 // peeled-loop backedge has 2 users.
512 Node* new_exit_value = old_new[head->in(LoopNode::LoopBackControl)->_idx]; 512 Node* new_entry = old_new[head->in(LoopNode::LoopBackControl)->_idx];
513 new_exit_value = move_loop_predicates(entry, new_exit_value, !counted_loop);
514 _igvn.hash_delete(head); 513 _igvn.hash_delete(head);
515 head->set_req(LoopNode::EntryControl, new_exit_value); 514 head->set_req(LoopNode::EntryControl, new_entry);
516 for (DUIterator_Fast jmax, j = head->fast_outs(jmax); j < jmax; j++) { 515 for (DUIterator_Fast jmax, j = head->fast_outs(jmax); j < jmax; j++) {
517 Node* old = head->fast_out(j); 516 Node* old = head->fast_out(j);
518 if (old->in(0) == loop->_head && old->req() == 3 && old->is_Phi()) { 517 if (old->in(0) == loop->_head && old->req() == 3 && old->is_Phi()) {
519 new_exit_value = old_new[old->in(LoopNode::LoopBackControl)->_idx]; 518 Node* new_exit_value = old_new[old->in(LoopNode::LoopBackControl)->_idx];
520 if (!new_exit_value ) // Backedge value is ALSO loop invariant? 519 if (!new_exit_value ) // Backedge value is ALSO loop invariant?
521 // Then loop body backedge value remains the same. 520 // Then loop body backedge value remains the same.
522 new_exit_value = old->in(LoopNode::LoopBackControl); 521 new_exit_value = old->in(LoopNode::LoopBackControl);
523 _igvn.hash_delete(old); 522 _igvn.hash_delete(old);
524 old->set_req(LoopNode::EntryControl, new_exit_value); 523 old->set_req(LoopNode::EntryControl, new_exit_value);