JDK-8330531 : Replace post loop opts checks with began macro expansion checks
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23
  • Priority: P5
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2024-04-17
  • Updated: 2024-04-22
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
Many cases check post_loop_opts(), when they should actually be checking allow_macro_nodes(), introduced in https://github.com/openjdk/jdk/pull/18824. Usually, allow_macro_nodes -> post_loop_opts, but this breaks in Shenandoah optimizations https://github.com/openjdk/jdk/blob/040c93565c0dff6270911eb9e58d78aa01bbb925/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp#L52. https://bugs.openjdk.org/browse/JDK-8329797 reveals a case.

We should go through the checks of post_loop_opts(), and see if they should instead be allow_macro_nodes(). This would help readability and would prevent introducing bugs.
A non-exhaustive list of examples that should probably be changed:
* https://github.com/openjdk/jdk/blob/040c93565c0dff6270911eb9e58d78aa01bbb925/src/hotspot/share/opto/cfgnode.cpp#L1571
* https://github.com/openjdk/jdk/blob/040c93565c0dff6270911eb9e58d78aa01bbb925/src/hotspot/share/opto/graphKit.cpp#L2904
* https://github.com/openjdk/jdk/blob/040c93565c0dff6270911eb9e58d78aa01bbb925/src/hotspot/share/opto/movenode.cpp#L277