aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/opto/ifnode.cpp
diff options
context:
space:
mode:
authorkvn <none@none>2009-07-16 14:10:42 -0700
committerkvn <none@none>2009-07-16 14:10:42 -0700
commit9ce143610af5d26b875f4bc1b08980d0f4f8bcdf (patch)
treeba5ac92106311a9a0a4b429100b1dcdafed78cfa /src/share/vm/opto/ifnode.cpp
parent3eb08e669acf37c6ae7b42b65de9288c2635635e (diff)
6851742: (EA) allocation elimination doesn't work with UseG1GC
Summary: Fix eliminate_card_mark() to eliminate G1 pre/post barriers. Reviewed-by: never
Diffstat (limited to 'src/share/vm/opto/ifnode.cpp')
-rw-r--r--src/share/vm/opto/ifnode.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/share/vm/opto/ifnode.cpp b/src/share/vm/opto/ifnode.cpp
index 38fab34a5..98cd93c3c 100644
--- a/src/share/vm/opto/ifnode.cpp
+++ b/src/share/vm/opto/ifnode.cpp
@@ -378,7 +378,18 @@ static Node* split_if(IfNode *iff, PhaseIterGVN *igvn) {
// 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 );