Add a debug-only verification pass that asserts that C2's Ideal graph is "well-formed" by checking basic, local invariants (e.g. control nodes (CFG nodes) can have multiple data node users but only one control node user, phi nodes must have an input region, If nodes must have two projections, etc.). This pass could be run at different steps of C2's compilation chain, e.g. after each IGVN pass.
Other example candidate invariants can be found at https://github.com/openjdk/jdk/blob/master/src/utils/IdealGraphVisualizer/ServerCompiler/src/main/java/com/sun/hotspot/igv/servercompiler/ServerCompilerScheduler.java (IGV checks some of these invariants while approximating the CFG).
Other example candidate invariants can be found at https://github.com/openjdk/jdk/blob/master/src/utils/IdealGraphVisualizer/ServerCompiler/src/main/java/com/sun/hotspot/igv/servercompiler/ServerCompilerScheduler.java (IGV checks some of these invariants while approximating the CFG).
- relates to
-
JDK-8353624 C2: Re-enable malformed graph assert removed with JDK-8317998 to reduce noise
-
- Open
-
-
JDK-8298951 Umbrella: improve CCP and IGVN verification
-
- Open
-
-
JDK-8349930 C2: verify memory liveness invariants after scheduling
-
- In Progress
-