RFR: 8375038: C2: Enforce that Ideal() returns the root of the subgraph if any change was made by checking the node hash [v3]
Benoît Maillard
bmaillard at openjdk.org
Fri Feb 6 11:05:22 UTC 2026
On Fri, 6 Feb 2026 10:42:35 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
>> Benoît Maillard has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add new flag bit to TestVerifyIterativeGVN
>
> 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).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29421#discussion_r2773553096
More information about the hotspot-dev
mailing list