JDK-8370127 : C2: Improve ReachabilityFence elimination
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 26
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-10-17
  • Updated: 2025-10-17
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
As part of reachability fence support in C2, JDK-8290892 introduces ReachabilityFence (RF) node elimination step after loop optimizations are over.  RF elimination transfers reachability edges from RF node to interfering safepoints and it uses dominator information produced by PhaseIdealLoop.
PhaseIdealLoop construction is expensive, so it's worth to avoid its construction whenever possible.

Possible ways to improve the situation:
  (1) piggyback on existing PhaseIdealLoop pass and eliminate RFs as the very end of the last pass of loop optimizations;
  (2) reimplement RF elimination without relying on PhaseIdealLoop (may be performed on Mach IR once code motion pass is over);