Mercurial > hg > truffle
diff src/share/vm/opto/ifnode.cpp @ 851:fc4be448891f
6851742: (EA) allocation elimination doesn't work with UseG1GC
Summary: Fix eliminate_card_mark() to eliminate G1 pre/post barriers.
Reviewed-by: never
author | kvn |
---|---|
date | Thu, 16 Jul 2009 14:10:42 -0700 |
parents | 98cb887364d3 |
children | 89e0543e1737 ce590301ae2a |
line wrap: on
line diff
--- a/src/share/vm/opto/ifnode.cpp Wed Jul 15 13:37:35 2009 -0700 +++ b/src/share/vm/opto/ifnode.cpp Thu Jul 16 14:10:42 2009 -0700 @@ -378,7 +378,18 @@ // Force the original merge dead igvn->hash_delete(r); - r->set_req_X(0,NULL,igvn); + // First, remove region's dead users. + for (DUIterator_Last lmin, l = r->last_outs(lmin); l >= lmin;) { + Node* u = r->last_out(l); + if( u == r ) { + r->set_req(0, NULL); + } else { + assert(u->outcnt() == 0, "only dead users"); + igvn->remove_dead_node(u); + } + l -= 1; + } + igvn->remove_dead_node(r); // Now remove the bogus extra edges used to keep things alive igvn->remove_dead_node( hook );