RFR: 8290892: C2: Intrinsify Reference.reachabilityFence [v11]
Vladimir Ivanov
vlivanov at openjdk.org
Wed Sep 17 19:47:21 UTC 2025
On Wed, 17 Sep 2025 19:38:29 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> Otherwise, please explain the meaning of `LoopOptsDefaultFinal`. Maybe it should be an OR here?
>
>> Why are you checking for _mode == LoopOptsDefaultFinal and not for LoopOptsEliminateRFs?
>
> The intention is to avoid an extra `PhaseIdealLoop` construction pass solely for `LoopOptsEliminateRFs` purposes when there's an empty pass during normal flow of loop optimizations.
>
> `LoopOptsEliminateRFs` is performed as the last resort when there was no previous pass to piggyback on.
Maybe `LoopOptsEliminateRFs` should stress that it is intended to happen as the very last step in the flow of loop optimizations. Or, something happening after all other loop optimizations are over. I'll think more about it.
>From code perspective, what makes things more complicated is that `PhaseIdealLoop` instance is hidden in `PhaseIdealLoop::optimize()`, so shaping it as a step in loop opts pipeline feels like the most appropriate thing to do.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25315#discussion_r2356597895
More information about the hotspot-compiler-dev
mailing list