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

Vladimir Ivanov vlivanov at openjdk.org
Mon Nov 3 22:09:21 UTC 2025


On Thu, 30 Oct 2025 15:54:05 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Vladimir Ivanov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix merge
>
> src/hotspot/share/opto/reachability.cpp line 180:
> 
>> 178:       return false; // uncommon traps are exit points
>> 179:     }
>> 180:     return true;
> 
> Looks like we have established "significance" by principle of exclusion. That feels a little brittle, what if there is yet another category we would have to exclude? Would that lead to correctness issues, or only be inefficient?
> 
> Also: "significant" is a bit of a vague term. Significant for what? "reachability tracking purposes", of course, we are in `reachability.hpp` ;)
> But can you be more specific?

`is_significant_sfpt()` encodes a white list consisting of cases which can be safely ignored when it comes to reachability tracking. An overlooked case is a missed optimization opportunity. 

> But can you be more specific?

Are you suggesting to expand the comment or change the name?

Speaking of the name, it's a local definition inside `reachabiltiy.cpp`:

// Detect safepoint nodes which are important for reachability tracking purposes.
static bool is_significant_sfpt(Node* n) {


`Significant` term is declarative. Alternatively, an imperative term (like, "ignore" and `ignore_sfpt`) can be used. But I find it the current version clearer.

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

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


More information about the hotspot-compiler-dev mailing list