RFR: 8347273: C2: VerifyIterativeGVN for Ideal and Identity [v10]

Emanuel Peter epeter at openjdk.org
Thu Jun 12 09:12:03 UTC 2025


> **Past Work**
> With https://github.com/openjdk/jdk/pull/11775 / [JDK-8298952](https://bugs.openjdk.org/browse/JDK-8298952) we added `Node::Value` verification.
> 
> **This PR**
> I'm now adding verification for `Ideal` and `Identity`. I'm adding two bits to the flag `VerifyIterativeGVN`.
> 
> I found many many  node types that hit my verification assert, i.e. that could still be optimized after IGVN is over, just because these nodes were not put on the worklist any more.
> 
> My approach was to aggressively bail-out for all nodes that had an issue. This way, we can address one by one in follow-up RFEs. For many, I did some initial assessment, and left some comments about what issues I encountered.
> 
> **Future Work:**
> In many cases, the issue is just a missing notification when inputs of inputs are changed. These would be good starter tasks. But there are probably also more complicated cases. And there are surely cases where verification will be impossible, because it is possible that the Idea / Identity optimizations traverse longer paths, and we cannot expect that notification makes it down that path. For those cases, we will have to leave the exception and document it well.
> 
> I filed:
> [JDK-8359103](https://bugs.openjdk.org/browse/JDK-8359103) C2 VerifyIterativeGVN: Umbrella for extending Ideal and Identity verification (JDK-8347273)
> (We can file subtasks for the nodes we want to fix. I don't want to file them all now, but we should file them as we are investigating, so that there is no duplicate work.)
> 
> Testing passed tier1-3, with extra timeout factor 20.

Emanuel Peter 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 79 additional commits since the last revision:

 - Merge branch 'master' into JDK-8347273-verify-IGVN-Ideal-Identity
 - update comments for Christian
 - Apply suggestions from code review
   
   Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
 - reorder flags for Christian
 - max_modes
 - use stringStream instead of ttyLocker
 - assert(false) for Christian
 - rename for Christian
 - Update src/hotspot/share/opto/phaseX.cpp
   
   Co-authored-by: Manuel Hässig <manuel at haessig.org>
 - review suggestions, and handled a few more edge cases
 - ... and 69 more: https://git.openjdk.org/jdk/compare/84e59324...d9546d87

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/22970/files
  - new: https://git.openjdk.org/jdk/pull/22970/files/f54d851a..d9546d87

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=22970&range=09
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22970&range=08-09

  Stats: 6953 lines in 245 files changed: 3281 ins; 3006 del; 666 mod
  Patch: https://git.openjdk.org/jdk/pull/22970.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22970/head:pull/22970

PR: https://git.openjdk.org/jdk/pull/22970


More information about the hotspot-dev mailing list