src/share/vm/opto/phaseX.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6866651 Cdiff src/share/vm/opto/phaseX.cpp

src/share/vm/opto/phaseX.cpp

Print this page

        

*** 981,990 **** --- 981,1001 ---- _table.hash_delete(n); if( VerifyIterativeGVN ) { assert( !_table.find_index(n->_idx), "found duplicate entry in table"); } + // If n computes a constant, replace it with a constant now to skip unneeded + // ideal transformations + const Type* t_n = type_or_null(n); + if( t_n != NULL && t_n->singleton() && !n->is_Con() ) { + NOT_PRODUCT( set_progress(); ) + Node *con = makecon(t_n); // Make a constant + add_users_to_worklist( n ); + subsume_node( n, con ); // Everybody using n now uses con + return con; + } + // Apply the Ideal call in a loop until it no longer applies Node *k = n; DEBUG_ONLY(dead_loop_check(k);) DEBUG_ONLY(bool is_new = (k->outcnt() == 0);) Node *i = k->Ideal(this, /*can_reshape=*/true);
*** 1620,1632 **** set_req(i, n); // old goes dead? if( old ) { switch (old->outcnt()) { ! case 0: // Kill all his inputs, and recursively kill other dead nodes. if (!old->is_top()) ! igvn->remove_dead_node( old ); break; case 1: if( old->is_Store() || old->has_special_unique_user() ) igvn->add_users_to_worklist( old ); break; --- 1631,1645 ---- set_req(i, n); // old goes dead? if( old ) { switch (old->outcnt()) { ! case 0: ! // Put into the worklist to kill later. We do not kill it now because the ! // recursive kill will delete the current node (this) if dead-loop exists if (!old->is_top()) ! igvn->_worklist.push( old ); break; case 1: if( old->is_Store() || old->has_special_unique_user() ) igvn->add_users_to_worklist( old ); break;
src/share/vm/opto/phaseX.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File