Mercurial > hg > graal-compiler
comparison src/share/vm/opto/phaseX.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 | 56601ef83436 |
comparison
equal
deleted
inserted
replaced
1620:d678e3277048 | 1621:6027dddc26c6 |
---|---|
1445 // Eagerly remove dead phis to avoid phis copies creation. | 1445 // Eagerly remove dead phis to avoid phis copies creation. |
1446 for (DUIterator i = n->outs(); n->has_out(i); i++) { | 1446 for (DUIterator i = n->outs(); n->has_out(i); i++) { |
1447 Node* m = n->out(i); | 1447 Node* m = n->out(i); |
1448 if( m->is_Phi() ) { | 1448 if( m->is_Phi() ) { |
1449 assert(type(m) == Type::TOP, "Unreachable region should not have live phis."); | 1449 assert(type(m) == Type::TOP, "Unreachable region should not have live phis."); |
1450 add_users_to_worklist(m); | 1450 replace_node(m, nn); |
1451 hash_delete(m); // Yank from hash before hacking edges | |
1452 subsume_node(m, nn); | |
1453 --i; // deleted this phi; rescan starting with next position | 1451 --i; // deleted this phi; rescan starting with next position |
1454 } | 1452 } |
1455 } | 1453 } |
1456 } | 1454 } |
1457 add_users_to_worklist(n); // Users of about-to-be-constant 'n' | 1455 replace_node(n,nn); // Update DefUse edges for new constant |
1458 hash_delete(n); // Removed 'n' from table before subsuming it | |
1459 subsume_node(n,nn); // Update DefUse edges for new constant | |
1460 } | 1456 } |
1461 return nn; | 1457 return nn; |
1462 } | 1458 } |
1463 | 1459 |
1464 // If x is a TypeNode, capture any more-precise type permanently into Node | 1460 // If x is a TypeNode, capture any more-precise type permanently into Node |