--- a/hotspot/src/share/vm/opto/loopTransform.cpp Sat Aug 10 10:01:12 2013 +0400
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp Wed Aug 14 10:21:26 2013 -0700
@@ -624,8 +624,6 @@
}
-#define MAX_UNROLL 16 // maximum number of unrolls for main loop
-
//------------------------------policy_unroll----------------------------------
// Return TRUE or FALSE if the loop should be unrolled or not. Unroll if
// the loop is a CountedLoop and the body is small enough.
@@ -642,7 +640,7 @@
if (cl->trip_count() <= (uint)(cl->is_normal_loop() ? 2 : 1)) return false;
int future_unroll_ct = cl->unrolled_count() * 2;
- if (future_unroll_ct > MAX_UNROLL) return false;
+ if (future_unroll_ct > LoopMaxUnroll) return false;
// Check for initial stride being a small enough constant
if (abs(cl->stride_con()) > (1<<2)*future_unroll_ct) return false;