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

Vladimir Ivanov vlivanov at openjdk.org
Fri Nov 7 06:38:46 UTC 2025


On Fri, 7 Nov 2025 05:19:11 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>>> Does VerifyLoopOptimizations catch it?
>> 
>> Probably not, because it is not very strong yet. I will probably soon work on it again, to make sure we have stronger invariants, or at least enforcing our implicit invariants ;)
>> 
>> In your case, you probably are using your new `remove_dead_node` in the way it "should" be used. But since this is a public API, someone will probably come along in the future and use it in unintended ways. That's why I'm asking for more asserts that at least block some wrong usages ;)
>
>> why I'm asking for more asserts that at least block some wrong usages 
> 
> Ok. As I said earlier, it doesn't look like `dead->is_dead()` would work here. Any other checks you have in mind?

The method only works for data nodes, so I renamed it to `remove_dead_data_node` and added `!dead->is_CFG()` assert (it was already checked, but down the call tree).

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

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


More information about the hotspot-compiler-dev mailing list