RFR: 8375038: C2: Enforce that Ideal() returns the root of the subgraph if any change was made by checking the node hash [v3]

Marc Chevalier mchevalier at openjdk.org
Fri Feb 6 11:05:23 UTC 2026


On Fri, 6 Feb 2026 11:00:11 GMT, Benoît Maillard <bmaillard at openjdk.org> wrote:

>> src/hotspot/share/opto/phaseX.cpp line 2130:
>> 
>>> 2128:   C->remove_modified_node(k);
>>> 2129: #ifndef PRODUCT
>>> 2130:   uint hash_before = is_verify_Ideal_return() ? k->hash() : 0;
>> 
>> Is this ternary really needed? Same under.
>
> The point was just to avoid useless computations. My assumption is that `hash` can be slightly expensive in some cases, but I must admit I have not checked every implementation (there are many).

Fair enough.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29421#discussion_r2773562584


More information about the hotspot-dev mailing list