< prev index next >

src/hotspot/share/opto/loopnode.cpp

Print this page

        

*** 1392,1404 **** Node* phi = NULL; for (DUIterator_Fast jmax, j = fast_outs(jmax); j < jmax; j++) { Node* uu = fast_out(j); if (uu->is_Phi()) { Node* be = uu->in(LoopNode::LoopBackControl); ! while (be->is_Store() && old_new[be->_idx] != NULL) { ! ShouldNotReachHere(); ! be = be->in(MemNode::Memory); } if (be == last || be == first->in(MemNode::Memory)) { assert(phi == NULL, "only one phi"); phi = uu; } --- 1392,1409 ---- Node* phi = NULL; for (DUIterator_Fast jmax, j = fast_outs(jmax); j < jmax; j++) { Node* uu = fast_out(j); if (uu->is_Phi()) { Node* be = uu->in(LoopNode::LoopBackControl); ! if (be->is_Store() && old_new[be->_idx] != NULL) { ! assert(false, "store on the backedge + sunk stores: unsupported"); ! // drop outer loop ! IfNode* outer_le = outer_loop_end(); ! Node* iff = igvn->transform(new IfNode(outer_le->in(0), outer_le->in(1), outer_le->_prob, outer_le->_fcnt)); ! igvn->replace_node(outer_le, iff); ! inner_cl->clear_strip_mined(); ! return; } if (be == last || be == first->in(MemNode::Memory)) { assert(phi == NULL, "only one phi"); phi = uu; }
*** 1447,1460 **** igvn->replace_input_of(first, MemNode::Memory, phi); } else { // Or fix the outer loop fix to include // that chain of stores. Node* be = phi->in(LoopNode::LoopBackControl); ! while (be->is_Store() && old_new[be->_idx] != NULL) { ! ShouldNotReachHere(); ! be = be->in(MemNode::Memory); ! } if (be == first->in(MemNode::Memory)) { if (be == phi->in(LoopNode::LoopBackControl)) { igvn->replace_input_of(phi, LoopNode::LoopBackControl, last); } else { igvn->replace_input_of(be, MemNode::Memory, last); --- 1452,1462 ---- igvn->replace_input_of(first, MemNode::Memory, phi); } else { // Or fix the outer loop fix to include // that chain of stores. Node* be = phi->in(LoopNode::LoopBackControl); ! assert(!(be->is_Store() && old_new[be->_idx] != NULL), "store on the backedge + sunk stores: unsupported"); if (be == first->in(MemNode::Memory)) { if (be == phi->in(LoopNode::LoopBackControl)) { igvn->replace_input_of(phi, LoopNode::LoopBackControl, last); } else { igvn->replace_input_of(be, MemNode::Memory, last);
< prev index next >