RFR: 8288421: IGV: warn user about all unreachable nodes
Christian Hagedorn
chagedorn at openjdk.java.net
Wed Jun 15 09:24:38 UTC 2022
On Wed, 15 Jun 2022 08:50:39 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
> This changeset ensures that, when approximating C2's schedule, IGV does not schedule unreachable nodes. Instead, a node warning is emitted, informing the user that the corresponding node is unreachable. This information can be useful when debugging ill-formed graphs.
>
> The following clustered subgraph illustrates the proposed change:
>
> 
>
> Currently _(before)_, `522 IfFalse` gets assigned the same block as `256 Region` (`B11`) in an effort to schedule as many nodes as possible, and hence no warning is emitted for `522 IfFalse`, even though it is clearly control-unreachable (since it is a child of `520 If` which is control-unreachable). This changeset _(after)_ leaves instead `522 IfFalse` unscheduled and emits a "Control-unreachable CFG node" warning for it (visible as a tooltip of the node warning sign).
>
> As a side-benefit, the changeset simplifies the IGV scheduling algorithm by removing the code that tries to schedule unrechable nodes code on a best-effort basis, and adds two additional node warnings ("Region with multiple successors" and "CFG node without control successors") to highlight the new nodes that might remain unscheduled as a consequence.
>
> #### Testing
>
> - Tested manually on the [graph](https://bugs.openjdk.org/secure/attachment/99555/graph.xml) attached to the JBS issue.
>
> - Tested automatically that scheduling tens of thousands of graphs (by instrumenting IGV to schedule parsed graphs eagerly and running `java -Xcomp -XX:-TieredCompilation -XX:PrintIdealGraphLevel=4`) does trigger any exception or assertion failure.
Looks good, thanks for fixing this! And nice new warnings.
-------------
Marked as reviewed by chagedorn (Reviewer).
PR: https://git.openjdk.org/jdk/pull/9164
More information about the hotspot-compiler-dev
mailing list