RFR: 8290892: C2: Intrinsify Reference.reachabilityFence [v19]
    Vladimir Ivanov 
    vlivanov at openjdk.org
       
    Mon Nov  3 22:09:18 UTC 2025
    
    
  
On Mon, 3 Nov 2025 21:05:35 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> src/hotspot/share/opto/loopnode.hpp line 1150:
>> 
>>> 1148: 
>>> 1149:   void remove_dead_node(Node* dead) {
>>> 1150:     assert(dead->outcnt() == 0 && !dead->is_top(), "node must be dead");
>> 
>> Could you assert `dead->is_dead()` here?
>> We should probably also not call this on a `CFG` node, otherwise we might destroy the "ctrl forwarding", see: https://git.openjdk.org/jdk/pull/27892
>> 
>> I'm only putting so much scrutiny here, because you are adding a new public method to `PhaseIdealLoop`, and that would require that it is clear how to use it, and not to use it.
>
>> Could you assert dead->is_dead() here?
> 
> Isn't it too strong here? `Node::is_dead()` requires all inputs to be nulled, but  `PhaseIterGVN::remove_globally_dead_node()` zaps node input array with nulls.
> We should probably also not call this on a CFG node, otherwise we might destroy the "ctrl forwarding"
Interesting. RF is a CFG node. How does broken ctrl forwarding manifest? Does `VerifyLoopOptimizations` catch it? I didn't see any failures with `-XX:+VerifyLoopOptimizations`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25315#discussion_r2487980936
    
    
More information about the hotspot-compiler-dev
mailing list