src/share/vm/opto/cfgnode.cpp

changeset 1976
6027dddc26c6
parent 1907
c18cbe5936b8
child 2314
f95d63e2154a
     1.1 --- a/src/share/vm/opto/cfgnode.cpp	Mon Jun 28 10:52:50 2010 -0700
     1.2 +++ b/src/share/vm/opto/cfgnode.cpp	Mon Jun 28 14:54:39 2010 -0700
     1.3 @@ -472,9 +472,7 @@
     1.4              assert( n->req() == 2 &&  n->in(1) != NULL, "Only one data input expected" );
     1.5              // Break dead loop data path.
     1.6              // Eagerly replace phis with top to avoid phis copies generation.
     1.7 -            igvn->add_users_to_worklist(n);
     1.8 -            igvn->hash_delete(n); // Yank from hash before hacking edges
     1.9 -            igvn->subsume_node(n, top);
    1.10 +            igvn->replace_node(n, top);
    1.11              if( max != outcnt() ) {
    1.12                progress = true;
    1.13                j = refresh_out_pos(j);
    1.14 @@ -518,18 +516,17 @@
    1.15          igvn->hash_delete(n); // Remove from worklist before modifying edges
    1.16          if( n->is_Phi() ) {   // Collapse all Phis
    1.17            // Eagerly replace phis to avoid copies generation.
    1.18 -          igvn->add_users_to_worklist(n);
    1.19 -          igvn->hash_delete(n); // Yank from hash before hacking edges
    1.20 +          Node* in;
    1.21            if( cnt == 0 ) {
    1.22              assert( n->req() == 1, "No data inputs expected" );
    1.23 -            igvn->subsume_node(n, parent_ctrl); // replaced by top
    1.24 +            in = parent_ctrl; // replaced by top
    1.25            } else {
    1.26              assert( n->req() == 2 &&  n->in(1) != NULL, "Only one data input expected" );
    1.27 -            Node* in1 = n->in(1);               // replaced by unique input
    1.28 -            if( n->as_Phi()->is_unsafe_data_reference(in1) )
    1.29 -              in1 = phase->C->top();            // replaced by top
    1.30 -            igvn->subsume_node(n, in1);
    1.31 +            in = n->in(1);               // replaced by unique input
    1.32 +            if( n->as_Phi()->is_unsafe_data_reference(in) )
    1.33 +              in = phase->C->top();      // replaced by top
    1.34            }
    1.35 +          igvn->replace_node(n, in);
    1.36          }
    1.37          else if( n->is_Region() ) { // Update all incoming edges
    1.38            assert( !igvn->eqv(n, this), "Must be removed from DefUse edges");
    1.39 @@ -2127,7 +2124,7 @@
    1.40      // if it's not there, there's nothing to do.
    1.41      Node* fallthru = proj_out(0);
    1.42      if (fallthru != NULL) {
    1.43 -      phase->is_IterGVN()->subsume_node(fallthru, in(0));
    1.44 +      phase->is_IterGVN()->replace_node(fallthru, in(0));
    1.45      }
    1.46      return phase->C->top();
    1.47    }

mercurial