src/share/vm/opto/loopnode.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/loopnode.cpp	Mon Sep 14 15:54:43 2015
--- new/src/share/vm/opto/loopnode.cpp	Mon Sep 14 15:54:42 2015

*** 2228,2238 **** --- 2228,2238 ---- // node. For CFG nodes, the _nodes array starts out and remains // holding the associated IdealLoopTree pointer. For DATA nodes, the // _nodes array holds the earliest legal controlling CFG node. // Allocate stack with enough space to avoid frequent realloc ! int stack_size = (C->unique() >> 1) + 16; // (unique>>1)+16 from Java2D stats ! int stack_size = (C->live_nodes() >> 1) + 16; // (live_nodes>>1)+16 from Java2D stats Node_Stack nstack( a, stack_size ); visited.Clear(); Node_List worklist(a); // Don't need C->root() on worklist since
*** 2684,2694 **** --- 2684,2694 ---- if (_dom_depth[i] > 0 && _idom[i] != NULL) { _dom_depth[i] = no_depth_marker; } } if (_dom_stk == NULL) { ! uint init_size = C->unique() / 100; // Guess that 1/100 is a reasonable initial size. ! uint init_size = C->live_nodes() / 100; // Guess that 1/100 is a reasonable initial size. if (init_size < 10) init_size = 10; _dom_stk = new GrowableArray<uint>(init_size); } // Compute new depth for each node. for (i = 0; i < _idom_size; i++) {
*** 2774,2785 **** --- 2774,2785 ---- // I need to inspect loop header pre-order numbers to properly nest my // loops. This means I need to sort my childrens' loops by pre-order. // The sort is of size number-of-control-children, which generally limits // it to size 2 (i.e., I just choose between my 2 target loops). void PhaseIdealLoop::build_loop_tree() { ! // Allocate stack of size C->unique()/2 to avoid frequent realloc ! GrowableArray <Node *> bltstack(C->unique() >> 1); ! // Allocate stack of size C->live_nodes()/2 to avoid frequent realloc ! GrowableArray <Node *> bltstack(C->live_nodes() >> 1); Node *n = C->root(); bltstack.push(n); int pre_order = 1; int stack_size;
*** 3664,3674 **** --- 3664,3674 ---- #ifndef PRODUCT //------------------------------dump------------------------------------------- void PhaseIdealLoop::dump( ) const { ResourceMark rm; Arena* arena = Thread::current()->resource_area(); ! Node_Stack stack(arena, C->unique() >> 2); ! Node_Stack stack(arena, C->live_nodes() >> 2); Node_List rpo_list; VectorSet visited(arena); visited.set(C->top()->_idx); rpo( C->root(), stack, visited, rpo_list ); // Dump root loop indexed by last element in PO order

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