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

src/share/vm/opto/phaseX.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

*** 781,791 **** //============================================================================= //------------------------------PhaseIterGVN----------------------------------- // Initialize hash table to fresh and clean for +VerifyOpto PhaseIterGVN::PhaseIterGVN( PhaseIterGVN *igvn, const char *dummy ) : PhaseGVN(igvn,dummy), _worklist( ), ! _stack(C->unique() >> 1), _delay_transform(false) { } //------------------------------PhaseIterGVN----------------------------------- // Initialize with previous PhaseIterGVN info; used by PhaseCCP --- 781,791 ---- //============================================================================= //------------------------------PhaseIterGVN----------------------------------- // Initialize hash table to fresh and clean for +VerifyOpto PhaseIterGVN::PhaseIterGVN( PhaseIterGVN *igvn, const char *dummy ) : PhaseGVN(igvn,dummy), _worklist( ), ! _stack(C->live_nodes() >> 1), _delay_transform(false) { } //------------------------------PhaseIterGVN----------------------------------- // Initialize with previous PhaseIterGVN info; used by PhaseCCP
*** 798,808 **** //------------------------------PhaseIterGVN----------------------------------- // Initialize with previous PhaseGVN info from Parser PhaseIterGVN::PhaseIterGVN( PhaseGVN *gvn ) : PhaseGVN(gvn), _worklist(*C->for_igvn()), ! _stack(C->unique() >> 1), _delay_transform(false) { uint max; // Dead nodes in the hash table inherited from GVN were not treated as --- 798,812 ---- //------------------------------PhaseIterGVN----------------------------------- // Initialize with previous PhaseGVN info from Parser PhaseIterGVN::PhaseIterGVN( PhaseGVN *gvn ) : PhaseGVN(gvn), _worklist(*C->for_igvn()), ! // TODO: Before incremental inlining it was allocated only once and it was fine. Now that ! // the constructor is used in incremental inlining, this consumes too much memory: ! // _stack(C->live_nodes() >> 1), ! // So, as a band-aid, we replace this by: ! _stack(C->comp_arena(), 32), _delay_transform(false) { uint max; // Dead nodes in the hash table inherited from GVN were not treated as
*** 1584,1594 **** return new_node; // Been there, done that, return old answer new_node = transform_once(n); // Check for constant _nodes.map( n->_idx, new_node ); // Flag as having been cloned // Allocate stack of size _nodes.Size()/2 to avoid frequent realloc ! GrowableArray <Node *> trstack(C->unique() >> 1); trstack.push(new_node); // Process children of cloned node while ( trstack.is_nonempty() ) { Node *clone = trstack.pop(); uint cnt = clone->req(); --- 1588,1598 ---- return new_node; // Been there, done that, return old answer new_node = transform_once(n); // Check for constant _nodes.map( n->_idx, new_node ); // Flag as having been cloned // Allocate stack of size _nodes.Size()/2 to avoid frequent realloc ! GrowableArray <Node *> trstack(C->live_nodes() >> 1); trstack.push(new_node); // Process children of cloned node while ( trstack.is_nonempty() ) { Node *clone = trstack.pop(); uint cnt = clone->req();
src/share/vm/opto/phaseX.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File