Integrated: 8265587: IGV: track nodes across matching

Roberto Castañeda Lozano rcastanedalo at
Wed Apr 28 08:48:56 UTC 2021

On Fri, 23 Apr 2021 12:31:20 GMT, Roberto Castañeda Lozano <rcastanedalo at> wrote:

> This change preserves, as much as possible, the IGV node identifier of Ideal nodes in their corresponding machine nodes created by `Matcher::match()`. This makes it possible to track nodes when stepping from "Before matching" to "After matching" in IGV, as illustrated for an extracted compare-and-branch subgraph in the following screenshot: 
> ![before-after-matching](
> #### Limitations
> This solution preserves most of the node relations across matching, however if an Ideal node is expanded into multiple machine nodes, only one of them is assigned the IGV identifier of the Ideal node (since IGV identifiers need to be unique within a compilation phase). This limitation can be seen in the following example, where the `CmpU` Ideal node is implemented with three `compU_rReg` machine nodes (one for each `jmpConU` machine node), but only one of the `compU_rReg` machine nodes (50) preserves the IGV identifier:
> ![before-after-matching-limitation](
> Overcoming this limitation would require explicitly serializing the entire before-after relation among nodes and adapting IGV's node selection and graph difference logic, which seems too complex for a relatively infrequent case.
> #### Testing
> - Regression-tested HotSpot changes on hs-tier1-3, windows-x64, linux-x64, linux-aarch64, and macosx-x64 (both release and debug).
> - Tested HotSpot graph generation and IGV graph loading and scheduling on tens of thousands of graphs by running `java -Xcomp -XX:-TieredCompilation -XX:PrintIdealGraphLevel=4 ...` on an instrumented IGV. Loading and scheduling are useful graph well-formedness tests, as they tend to fail for incorrect graphs, e.g. with repeated node identifiers.
> - Tested manually, for a few graphs, that nodes of different types can be tracked across matching.

This pull request has now been integrated.

Changeset: e879f8c6
Author:    Roberto Castañeda Lozano <rcastanedalo at>
Stats:     50 lines in 4 files changed: 20 ins; 13 del; 17 mod

8265587: IGV: track nodes across matching

Preserve the IGV node identifier of Ideal nodes in their corresponding machine
nodes after matching, to allow IGV users to track nodes across this phase.

Reviewed-by: thartmann, vlivanov



More information about the hotspot-compiler-dev mailing list