Mercurial > hg > graal-compiler
diff src/share/vm/opto/loopTransform.cpp @ 20671:9e69e8d1c900
8058148: MaxNodeLimit and LiveNodeCountInliningCutoff
Reviewed-by: kvn, roland
author | vlivanov |
---|---|
date | Mon, 24 Nov 2014 07:29:03 -0800 |
parents | cd3c534f8f4a |
children | 5b8e0f84f00f |
line wrap: on
line diff
--- a/src/share/vm/opto/loopTransform.cpp Tue Nov 11 04:46:13 2014 -0800 +++ b/src/share/vm/opto/loopTransform.cpp Mon Nov 24 07:29:03 2014 -0800 @@ -269,10 +269,9 @@ bool IdealLoopTree::policy_peeling( PhaseIdealLoop *phase ) const { Node *test = ((IdealLoopTree*)this)->tail(); int body_size = ((IdealLoopTree*)this)->_body.size(); - int live_node_count = phase->C->live_nodes(); // Peeling does loop cloning which can result in O(N^2) node construction if( body_size > 255 /* Prevent overflow for large body_size */ - || (body_size * body_size + live_node_count > MaxNodeLimit) ) { + || (body_size * body_size + phase->C->live_nodes()) > phase->C->max_node_limit() ) { return false; // too large to safely clone } while( test != _head ) { // Scan till run off top of loop @@ -601,7 +600,7 @@ return false; if (new_body_size > unroll_limit || // Unrolling can result in a large amount of node construction - new_body_size >= MaxNodeLimit - (uint) phase->C->live_nodes()) { + new_body_size >= phase->C->max_node_limit() - phase->C->live_nodes()) { return false; } @@ -2287,8 +2286,8 @@ // Skip next optimizations if running low on nodes. Note that // policy_unswitching and policy_maximally_unroll have this check. - uint nodes_left = MaxNodeLimit - (uint) phase->C->live_nodes(); - if ((2 * _body.size()) > nodes_left) { + int nodes_left = phase->C->max_node_limit() - phase->C->live_nodes(); + if ((int)(2 * _body.size()) > nodes_left) { return true; }