Mercurial > hg > graal-jvmci-8
diff src/share/vm/opto/phaseX.cpp @ 23421:c1091733abe6
8011858: Use Compile::live_nodes() instead of Compile::unique() in appropriate places
Reviewed-by: kvn, vlivanov
Contributed-by: vlad.ureche@gmail.com
author | zmajo |
---|---|
date | Wed, 16 Sep 2015 11:09:09 +0200 |
parents | 03596ae35800 |
children | 70649f10b88c 94ec11846b18 |
line wrap: on
line diff
--- a/src/share/vm/opto/phaseX.cpp Sun Sep 06 05:02:06 2015 -0700 +++ b/src/share/vm/opto/phaseX.cpp Wed Sep 16 11:09:09 2015 +0200 @@ -783,7 +783,7 @@ //------------------------------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), + _stack(C->live_nodes() >> 1), _delay_transform(false) { } @@ -800,7 +800,11 @@ // Initialize with previous PhaseGVN info from Parser PhaseIterGVN::PhaseIterGVN( PhaseGVN *gvn ) : PhaseGVN(gvn), _worklist(*C->for_igvn()), - _stack(C->unique() >> 1), +// 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; @@ -1586,7 +1590,7 @@ _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); + GrowableArray <Node *> trstack(C->live_nodes() >> 1); trstack.push(new_node); // Process children of cloned node while ( trstack.is_nonempty() ) {