RFR: 8290892: C2: Intrinsify Reference.reachabilityFence [v11]
Vladimir Ivanov
vlivanov at openjdk.org
Wed Sep 17 19:41:40 UTC 2025
On Fri, 12 Sep 2025 13:47:49 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/loopnode.cpp line 5341:
>>
>>> 5339: C->print_method(PHASE_ELIMINATE_REACHABILITY_FENCES, 2);
>>> 5340: assert(C->reachability_fences_count() == 0, "no RF nodes allowed");
>>> 5341: }
>>
>> Can we somehow assert that we now really will never do loop-opts again?
>> Why are you checking for `_mode == LoopOptsDefaultFinal` and not for `LoopOptsEliminateRFs`?
>> If that was a bug, then more verification would be extra justified ;)
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25315#discussion_r2356569319
More information about the hotspot-compiler-dev
mailing list