JDK-8022993 : Convert MAX_UNROLL constant to LoopMaxUnroll C2 flag
  • Type: Enhancement
  • Status: Resolved
  • Resolution: Fixed
  • Component: hotspot
  • Sub-Component: compiler
  • Priority: P3
  • Affected Version: hs25
  • OS: generic
  • CPU: generic
  • Submit Date: 2013-08-13
  • Updated Date: 2014-02-12
  • Resolved Date: 2013-08-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u60Fixed 8Resolved
Description
C2 has max unroll limit hard coded:

#define MAX_UNROLL 16 // maximum number of unrolls for main loop

It limits size of vectors (byte vectors) which are used in AVX instructions. There is no feed back from vectorization code to loop unrolling because superword optimization is executed at the end of all loop opts. We can make policy_unroll() method more intelligent to recognize vectorization cases but it is a lot more code changes. For now just use new  LoopMaxUnroll flag instead of MAX_UNROLL constant.
Comments
No need test because just use new LoopMaxUnroll flag instead of MAX_UNROLL constant.
2013-11-19