RFR: 8290892: C2: Intrinsify Reference.reachabilityFence [v19]

Emanuel Peter epeter at openjdk.org
Fri Nov 7 11:13:29 UTC 2025


On Mon, 3 Nov 2025 21:24:19 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Ah no, in all cases I could see it was actually the `rf` itself, right? Why not give it a more specific name?
>
>> But it seems you are using it from different places. Can you find a better name?
> 
> Both IGVN (`ReachabilityFenceNode::Identity()`) and `PhaseIdealLoop` perform redundant RF elimination, so `is_redundant_rf_helper` is there so they can share the same implementation. I could name it `is_redundant_rf`, but it doesn't look like an improvement to me. It's tailored specifically for those 2 particular use cases and it is not intended to be used outside `reachability.cpp`.

It is just strange to see a `helper` without its "master", like it it looks now in `ReachabilityFenceNode::Identity`. Right, naming multiple methods the same is generally also confusing.

Maybe `PhaseIdealLoop::is_redundant_rf` could be `PhaseIdealLoop::is_redundant_rf_in_loop`? Would that even be an accurate name? But I'll let you decide, if it's too hard to find something better, I can live with `_helper`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25315#discussion_r2502579039


More information about the hotspot-compiler-dev mailing list