src/share/vm/opto/loopTransform.cpp

changeset 1976
6027dddc26c6
parent 1907
c18cbe5936b8
child 2118
d6f45b55c972
equal deleted inserted replaced
1975:d678e3277048 1976:6027dddc26c6
192 addx = new (phase->C, 3) SubINode(inv, x); 192 addx = new (phase->C, 3) SubINode(inv, x);
193 } else { 193 } else {
194 addx = new (phase->C, 3) AddINode(x, inv); 194 addx = new (phase->C, 3) AddINode(x, inv);
195 } 195 }
196 phase->register_new_node(addx, phase->get_ctrl(x)); 196 phase->register_new_node(addx, phase->get_ctrl(x));
197 phase->_igvn.hash_delete(n1); 197 phase->_igvn.replace_node(n1, addx);
198 phase->_igvn.subsume_node(n1, addx);
199 return addx; 198 return addx;
200 } 199 }
201 200
202 //---------------------reassociate_invariants----------------------------- 201 //---------------------reassociate_invariants-----------------------------
203 // Reassociate invariant expressions: 202 // Reassociate invariant expressions:
1584 // iteration. Then the CountedLoopEnd will collapse (backedge never 1583 // iteration. Then the CountedLoopEnd will collapse (backedge never
1585 // taken) and all loop-invariant uses of the exit values will be correct. 1584 // taken) and all loop-invariant uses of the exit values will be correct.
1586 Node *phi = cl->phi(); 1585 Node *phi = cl->phi();
1587 Node *final = new (phase->C, 3) SubINode( cl->limit(), cl->stride() ); 1586 Node *final = new (phase->C, 3) SubINode( cl->limit(), cl->stride() );
1588 phase->register_new_node(final,cl->in(LoopNode::EntryControl)); 1587 phase->register_new_node(final,cl->in(LoopNode::EntryControl));
1589 phase->_igvn.hash_delete(phi); 1588 phase->_igvn.replace_node(phi,final);
1590 phase->_igvn.subsume_node(phi,final);
1591 phase->C->set_major_progress(); 1589 phase->C->set_major_progress();
1592 return true; 1590 return true;
1593 } 1591 }
1594 1592
1595 1593

mercurial