In PhaseIterGVN::verify_Ideal_for, the Ideal method is called for a given node to assert that no further optimization can be done. According to the comments in node.cpp, if any change is made by Ideal, it must return the root of the reshaped graph.
For this reason, we check the return value of Ideal and only flag a missed optimization if it is not nullptr. However, since this runs in a verification context, we should not fully rely on the assumption that Ideal always adheres to this contract and we should also verify it.
To strengthen the verification, we could compute the hash of the node before calling Ideal, then recompute and compare it afterward to detect any unexpected changes to the structure of the graph.
For this reason, we check the return value of Ideal and only flag a missed optimization if it is not nullptr. However, since this runs in a verification context, we should not fully rely on the assumption that Ideal always adheres to this contract and we should also verify it.
To strengthen the verification, we could compute the hash of the node before calling Ideal, then recompute and compare it afterward to detect any unexpected changes to the structure of the graph.
- relates to
-
JDK-8359602 Ideal optimizations depending on input type are missed because of missing notification mechanism from CCP
-
- In Progress
-
-
JDK-8347273 C2: VerifyIterativeGVN for Ideal and Identity
-
- Resolved
-
- links to
-
Review(master) openjdk/jdk/26064