Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/loopTransform.cpp @ 1621:6027dddc26c6
6677629: PhaseIterGVN::subsume_node() should call hash_delete() and add_users_to_worklist()
Summary: Use replace_node() method instead of subsume_node().
Reviewed-by: jrose, never
author | kvn |
---|---|
date | Mon, 28 Jun 2010 14:54:39 -0700 |
parents | c18cbe5936b8 |
children | d6f45b55c972 |
comparison
equal
deleted
inserted
replaced
1620:d678e3277048 | 1621: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 |