RFR: 8361144: Strenghten the Ideal Verification in PhaseIterGVN::verify_Ideal_for by comparing the hash of a node before and after Ideal [v3]
Emanuel Peter
epeter at openjdk.org
Thu Jul 3 05:02:40 UTC 2025
On Wed, 2 Jul 2025 10:19:59 GMT, Benoît Maillard <bmaillard at openjdk.org> wrote:
>> This PR adds a node hash comparison after calling `Ideal` in `PhaseIterGVN::verify_Ideal_for` to introduce an additional layer of verification for missed optimizations. Previously, we relied on the return value of `Ideal`, which is expected to be `nullptr` if no transformation was done.
>>
>> By also checking the node's hash before and after `Ideal`, we could catch inconsistencies in the implementation or unintended modifications to the graph. Both of these may indicate missed or incomplete optimizations.
>>
>> ### Testing
>> - [x] [GitHub Actions](https://github.com/benoitmaillard/jdk/actions?query=branch%3AJDK-8361144)
>> - [x] tier1-3, plus some internal testing
>>
>> Thank you for reviewing!
>
> Benoît Maillard has updated the pull request incrementally with one additional commit since the last revision:
>
> 8361144: add comment for consistency with node count
Thanks for adding this @benoitmaillard !
I don't think you need to add a regression test here.
What you should do though: run tier1-3 + additional testing, one with the verification enabled and once without. Just to see if there are any cases that currently fail with this verification.
-------------
Marked as reviewed by epeter (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26064#pullrequestreview-2981695058
More information about the hotspot-compiler-dev
mailing list