RFR: 8325478: Restructure the macro expansion compiler phase to not include macro elimination [v8]
Saranya Natarajan
snatarajan at openjdk.org
Tue Jul 1 16:28:27 UTC 2025
> This changeset restructures the macro expansion phase to not include macro elimination and also adds a flag StressMacroElimination which randomizes macro elimination ordering for stress testing purposes.
>
> Changes:
> - Implemented a method `eliminate_opaque_looplimit_macro_nodes` that removes the functionality for eliminating Opaque and LoopLimit nodes from the `expand_macro_nodes ` method.
> - Introduced compiler phases` PHASE_AFTER_MACRO_ELIMINATION`
> - Added a new Ideal phase for individual macro elimination steps.
> - Implemented the flag `StressMacroElimination`. Added functionality tests for `StressMacroElimination`, similar to previous stress flag `StressMacroExpansion` ([JDK-8317349](https://bugs.openjdk.org/browse/JDK-8317349)).
>
> Below is a sample screenshot (IGV print level 4 ) mainly showing the new phase .
> 
>
> Questions to reviewers:
> - Is the new macro elimination phase OK, or should we change anything?
> - In `compile.cpp `, `PHASE_ITER_GVN_AFTER_ELIMINATION` follows `PHASE_AFTER_MACRO_ELIMINATION` in the current fix. Should `PHASE_ITER_GVN_AFTER_ELIMINATION` be removed ?
>
> Testing:
> GitHub Actions
> tier1 to tier5 on windows-x64, linux-x64, linux-aarch64, macosx-x64, and macosx-aarch64.
> Tested that thousands of graphs are correctly opened and visualized with IGV using the same test used in ([JDK-8317349](https://bugs.openjdk.org/browse/JDK-8317349))
Saranya Natarajan has updated the pull request incrementally with one additional commit since the last revision:
review comments fix part 1
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25682/files
- new: https://git.openjdk.org/jdk/pull/25682/files/939be78b..791b6a0c
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25682&range=07
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25682&range=06-07
Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/25682.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25682/head:pull/25682
PR: https://git.openjdk.org/jdk/pull/25682
More information about the hotspot-compiler-dev
mailing list