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

Emanuel Peter epeter at openjdk.org
Fri Nov 7 15:07:27 UTC 2025


On Fri, 7 Nov 2025 11:39:32 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/reachability.cpp line 474:
>> 
>>> 472:       }
>>> 473:     }
>>> 474:     redundant_rfs.push(rf);
>> 
>> I think the name `redundant_rfs` is a bit confusing here. Because above you may just have checked if `is_redundant_rf` and it may have returned false. So it does not really make sense to call it a "redundant rf". This confused me when I was trying out a simple example in the debugger.
>
> Another question:
> What if `!is_redundant_rf` and we found no sfpt candidates? Is it ok to just eliminate the rf here?

I suppose yes, because no GC could have happened since, right?

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

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


More information about the hotspot-compiler-dev mailing list