RFR: 8343941: IGV: dump graph at different register allocation steps

Christian Hagedorn chagedorn at openjdk.org
Tue Nov 12 08:29:54 UTC 2024


On Mon, 11 Nov 2024 14:41:46 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> This changeset dumps C2's low-level intermediate representation at the following intermediate register allocation points:
> - Initial liveness: after initial liveness information is computed.
> - Aggressive coalescing: after aggressively coalescing live ranges and destructing SSA.
> - Initial spilling: after initial round of spilling derived from physical interference graph construction.
> - Conservative coalescing: after each round of conservative (colorability-preserving) coalescing (if `OptoCoalesce` is enabled).
> - Iterative spilling: after each round of spilling.
> - After iterative spilling: after the main register allocation loop.
> - Post-allocation copy removal: after peephole copy removal.
> - Merge multiple definitions: after local merging of equivalent nodes related by the same live range.
> - Fix up spills: convert load-store spills into memory operand accesses ("CISC spilling") if allowed by the target platform and `UseCISCSpill` is enabled.
> 
> The new dumps have already proved to be useful in the investigation of [JDK-8331295](https://bugs.openjdk.org/browse/JDK-8331295).
> 
> #### Testing
> 
> - tier1-3 (windows-x64, linux-x64, linux-aarch64, macosx-x64, and macosx-aarch64).
> - Tested automatically that dumping, scheduling, and viewing hundreds of the new graphs does not trigger any failure on HotSpot or IGV (by instrumenting IGV to schedule and view graphs eagerly and running `java -Xbatch -XX:PrintIdealGraphLevel=4`).

Looks good!

Just an idea, since you've provided a nice description for each phase in the PR description, should we add these in phasetype.hpp at the phases?

src/hotspot/share/opto/phasetype.hpp line 104:

> 102:   flags(POST_ALLOCATION_COPY_REMOVAL,   "Post-allocation copy removal") \
> 103:   flags(MERGE_MULTIDEFS,                "Merge multiple definitions") \
> 104:   flags(FIXUP_SPILLS,                   "Fix up spills") \

Should we split at the word boundary?
Suggestion:

  flags(FIX_UP_SPILLS,                   "Fix up spills") \

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

Marked as reviewed by chagedorn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22017#pullrequestreview-2428867541
PR Review Comment: https://git.openjdk.org/jdk/pull/22017#discussion_r1837667475


More information about the hotspot-compiler-dev mailing list