JDK-8256655 : rework long counted loop handling
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-11-19
  • Updated: 2024-05-06
  • Resolved: 2020-12-01
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 Availability Release.

To download the current JDK release, click here.
JDK 16
16 b27Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Currently the transformation of a long counted loop to a loop nest with an inner int counted loop is performed in 2 steps:

1- recognize the counted loop shape and build the loop nest
2- transform the inner loop into a counted loop

I propose changing this to a 3 steps process:

1- recognize the counted loop shape (transform the loop into a LongCountedLoop)
2- build the loop nest
3- transform the inner loop into a counted loop

The benefits are:

- the logic is cleaner because step 1 and 2 are now separated
- simple optimizations (loop iv type, empty loop elimination, parallel iv) can be implemented for LongCountedLoop by refactoring existing code
Comments
Changeset: 3d460bd2 Author: Roland Westrelin <roland@openjdk.org> Date: 2020-12-01 07:30:51 +0000 URL: https://git.openjdk.java.net/jdk/commit/3d460bd2
01-12-2020