src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/compile.cpp	Mon Nov  7 13:52:42 2011
--- new/src/share/vm/opto/compile.cpp	Mon Nov  7 13:52:42 2011

*** 344,372 **** --- 344,379 ---- } // Disconnect all useless nodes by disconnecting those at the boundary. void Compile::remove_useless_nodes(Unique_Node_List &useful) { uint next = 0; ! while( next < useful.size() ) { ! while (next < useful.size()) { Node *n = useful.at(next++); // Use raw traversal of out edges since this code removes out edges int max = n->outcnt(); - for (int j = 0; j < max; ++j ) { Node* child = n->raw_out(j); ! if( ! useful.member(child) ) { - assert( !child->is_top() || child != top(), ! if (! useful.member(child)) { ! assert(!child->is_top() || child != top(), "If top is cached in Compile object it is in useful list"); // Only need to remove this out-edge to the useless node n->raw_del_out(j); --j; --max; } } if (n->outcnt() == 1 && n->has_special_unique_user()) { ! record_for_igvn( n->unique_out() ); } } + // Remove useless macro and predicate opaq nodes + for (int i = C->macro_count()-1; i >= 0; i--) { + Node* n = C->macro_node(i); + if (!useful.member(n)) { + remove_macro_node(n); + } + } debug_only(verify_graph_edges(true/*check for no_dead_code*/);) } //------------------------------frame_size_in_words----------------------------- // frame_slots in units of words
*** 717,726 **** --- 724,734 ---- // now inline anything that we skipped the first time around while (_late_inlines.length() > 0) { CallGenerator* cg = _late_inlines.pop(); cg->do_late_inline(); + if (failing()) return; } } assert(_late_inlines.length() == 0, "should have been processed"); print_method("Before RemoveUseless", 3);
*** 1689,1705 **** --- 1697,1720 ---- if (failing()) return; // Perform escape analysis if (_do_escape_analysis && ConnectionGraph::has_candidates(this)) { + if (has_loops()) { + // Cleanup graph (remove dead nodes). + TracePhase t2("idealLoop", &_t_idealLoop, true); + PhaseIdealLoop ideal_loop( igvn, false, true ); + if (major_progress()) print_method("PhaseIdealLoop before EA", 2); + if (failing()) return; + } TracePhase t2("escapeAnalysis", &_t_escapeAnalysis, true); ConnectionGraph::do_analysis(this, &igvn); if (failing()) return; igvn.optimize(); ! print_method("Iter GVN 3", 2); ! print_method("Iter GVN after EA", 2); if (failing()) return; }

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