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

src/share/vm/opto/compile.cpp

Print this page
rev 7539 : 8011858: Use Compile::live_nodes() instead of Compile::unique() in appropriate places
Reviewed-by: kvn, vlivanov
Contributed-by: vlad.ureche@gmail.com

*** 325,335 **** // Identify all nodes that are reachable from below, useful. // Use breadth-first pass that records state in a Unique_Node_List, // recursive traversal is slower. void Compile::identify_useful_nodes(Unique_Node_List &useful) { ! int estimated_worklist_size = unique(); useful.map( estimated_worklist_size, NULL ); // preallocate space // Initialize worklist if (root() != NULL) { useful.push(root()); } // If 'top' is cached, declare it useful to preserve cached node --- 325,335 ---- // Identify all nodes that are reachable from below, useful. // Use breadth-first pass that records state in a Unique_Node_List, // recursive traversal is slower. void Compile::identify_useful_nodes(Unique_Node_List &useful) { ! int estimated_worklist_size = live_nodes(); useful.map( estimated_worklist_size, NULL ); // preallocate space // Initialize worklist if (root() != NULL) { useful.push(root()); } // If 'top' is cached, declare it useful to preserve cached node
*** 3210,3221 **** } Final_Reshape_Counts frc; // Visit everybody reachable! ! // Allocate stack of size C->unique()/2 to avoid frequent realloc ! Node_Stack nstack(unique() >> 1); final_graph_reshaping_walk(nstack, root(), frc); // Check for unreachable (from below) code (i.e., infinite loops). for( uint i = 0; i < frc._tests.size(); i++ ) { MultiBranchNode *n = frc._tests[i]->as_MultiBranch(); --- 3210,3221 ---- } Final_Reshape_Counts frc; // Visit everybody reachable! ! // Allocate stack of size C->live_nodes()/2 to avoid frequent realloc ! Node_Stack nstack(live_nodes() >> 1); final_graph_reshaping_walk(nstack, root(), frc); // Check for unreachable (from below) code (i.e., infinite loops). for( uint i = 0; i < frc._tests.size(); i++ ) { MultiBranchNode *n = frc._tests[i]->as_MultiBranch();
src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File