RFR: 8361144: Strenghten the Ideal Verification in PhaseIterGVN::verify_Ideal_for by comparing the hash of a node before and after Ideal [v4]

duke duke at openjdk.org
Mon Jul 14 11:07:45 UTC 2025


On Mon, 14 Jul 2025 08:05:34 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
> 
>  - Merge branch 'master' into JDK-8361144
>  - 8361144: add comment for consistency with node count
>  - 8361144: update comment
>    
>    Co-authored-by: Damon Fenacci <damon.fenacci at oracle.com>
>  - 8361144: remove unintentional line break
>  - 8361144: move hash check after return value check and use same format as unique counter check
>  - 8361144: add check for node hash after verifying ideal

@benoitmaillard 
Your change (at version 8660d6ae5903131b25fa02dd2c2eb59c80699cd0) is now ready to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk/pull/26064#issuecomment-3069009411


More information about the hotspot-compiler-dev mailing list