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

Emanuel Peter epeter at openjdk.org
Fri Sep 12 14:12:45 UTC 2025


On Fri, 12 Sep 2025 13:38:08 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Vladimir Ivanov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Minor fix
>
> src/hotspot/share/opto/callGenerator.cpp line 620:
> 
>> 618:     // Inlining logic doesn't expect any extra edges past debug info and fails with
>> 619:     // an assert in SafePointNode::grow_stack.
>> 620:     assert(endoff == call->req(), "reachability edges not supported");
> 
> Could we trip over this assert by modifying the reproducer, and add some method somewhere that gets inlined late?

Could we also bail out here? Or what would happen now in production if there is a RF edge?

> 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?

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

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


More information about the hotspot-compiler-dev mailing list