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

Vladimir Ivanov vlivanov at openjdk.org
Fri Nov 7 19:14:11 UTC 2025


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

>> Vladimir Ivanov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update
>
> src/hotspot/share/opto/reachability.cpp line 441:
> 
>> 439: 
>> 440:   assert(OptimizeReachabilityFences, "required");
>> 441:   assert(C->post_loop_opts_phase(), "required");
> 
> You could give the reason in the assert message ;)

Those are essentially preconditions. I'm not a fan of duplicating information over and over again. Assert messages won't add much beyond what the condition already says unless the message explains why precondition is there. But that would explode message size.

I can use `precond` here if you are against generic messages in asserts.

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

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


More information about the hotspot-compiler-dev mailing list