JDK-8325746 : Refactor Loop Unswitching code
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-02-13
  • Updated: 2024-08-02
  • Resolved: 2024-02-28
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 23
23 b12Fixed
Related Reports
Relates :  
Description
To simplify the review of JDK-8305638, I've decided to split off some code into separate sub-tasks.

This sub-task focuses on the code refactoring done in Loop Unswitching which covers:
- Adding a more detailed description about the Loop Unswitching optimization itself below the file header.
- Renaming the fast loop->true-path-loop and slow loop -> false-path-loop since we don't really know which one is faster and to avoid keeping a mental map of which path goes into which unswitched loop version.
- Creating new classes:
  - UnswitchedLoopSelector to created the unswitched loop selector (i.e. the If node that selects at runtime which unswitched loop version that is executed).
  - OriginalLoop to do the actual unswitching (i.e. loop cloning, predicates cloning and fixing the graph to the loop selector If)./- Extracting methods in do_unswitching() to clean it up.
- Improving TraceLoopUnswitching code.
- Adding some shared utility methods.
Comments
Changeset: 6cad07c2 Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2024-02-28 07:03:57 +0000 URL: https://git.openjdk.org/jdk/commit/6cad07c23b16aa9eb5a5a0674344d494843601dc
28-02-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/17842 Date: 2024-02-14 09:06:03 +0000
14-02-2024