1.1 --- a/src/share/vm/opto/loopnode.cpp Thu Mar 06 10:30:17 2008 -0800 1.2 +++ b/src/share/vm/opto/loopnode.cpp Thu Mar 06 10:53:33 2008 -0800 1.3 @@ -1561,7 +1561,7 @@ 1.4 // on just their loop-phi's for this pass of loop opts 1.5 if( SplitIfBlocks && do_split_ifs ) { 1.6 if (lpt->policy_range_check(this)) { 1.7 - lpt->_rce_candidate = true; 1.8 + lpt->_rce_candidate = 1; // = true 1.9 } 1.10 } 1.11 } 1.12 @@ -2145,7 +2145,7 @@ 1.13 // as well? If so, then I found another entry into the loop. 1.14 while( is_postvisited(l->_head) ) { 1.15 // found irreducible 1.16 - l->_irreducible = true; 1.17 + l->_irreducible = 1; // = true 1.18 l = l->_parent; 1.19 _has_irreducible_loops = true; 1.20 // Check for bad CFG here to prevent crash, and bailout of compile 1.21 @@ -2199,6 +2199,12 @@ 1.22 (iff->as_If()->_prob >= 0.01) ) 1.23 innermost->_has_call = 1; 1.24 } 1.25 + } else if( n->is_Allocate() && n->as_Allocate()->_is_scalar_replaceable ) { 1.26 + // Disable loop optimizations if the loop has a scalar replaceable 1.27 + // allocation. This disabling may cause a potential performance lost 1.28 + // if the allocation is not eliminated for some reason. 1.29 + innermost->_allow_optimizations = false; 1.30 + innermost->_has_call = 1; // = true 1.31 } 1.32 } 1.33 }