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

Emanuel Peter epeter at openjdk.org
Thu Oct 30 15:59:10 UTC 2025


On Thu, 30 Oct 2025 15:03:48 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/escape.cpp line 1230:
> 
>> 1228:     SafePointNode* sfpt = safepoints.at(spi)->as_SafePoint();
>> 1229: 
>> 1230:     sfpt->remove_non_debug_edges(non_debug_edges_worklist);
> 
> This looks a bit "hacky". Can you add some code comments why we need to do it this way?

Same for the other occurances ;)

> src/hotspot/share/opto/reachability.cpp line 89:
> 
>> 87: // In terms of dominance relation it can be formulated as "a referent has a user which is dominated by the redundant RF".
>> 88: // Until loop opts are over, only RF nodes are considered as usages (controlled by rf_only flag).
>> 89: static bool is_redundant_rf_helper(Node* ctrl, Node* referent, PhaseIdealLoop* phase, PhaseGVN& gvn, bool rf_only) {
> 
> Nit: `_helper` is fine if it is used as some internal method, i.e. only `is_redundant_rf` uses `is_redundant_rf_helper`. But it seems you are using it from different places. Can you find a better name?

Can you write a comment what `ctrl`? Is it the `referent_ctrl`?

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

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


More information about the hotspot-compiler-dev mailing list