RFR: 8317349: Randomize order of macro node expansion in C2
Daniel Lundén
dlunden at openjdk.org
Fri Feb 2 13:07:12 UTC 2024
This changeset adds a flag `StressMacroExpansion` which randomizes macro expansion ordering for stress testing purposes.
Changes:
- Implement the flag `StressMacroExpansion`.
- Add functionality tests for `StressMacroExpansion`, analogous to testing for previous stress flags such as `StressIGVN`.
- Add `StressMacroExpansion` to a number of tests that already turn on all other stress flags (and therefore should also use `StressMacroExpansion`).
- Rename the previous compiler phase `MACRO_EXPANSION` to `AFTER_MACRO_EXPANSION`.
- Add new Ideal phases related to macro expansion, allowing `StressMacroExpansion` testing. Below is a sample phase list screenshot including some of the new phases (IGV print level 4).
<p align="center">
<img src="https://github.com/openjdk/jdk/assets/4222397/b65c67a0-13f7-45a6-aef4-5dfe259dab66" width="300">
</p>
Question for the review: are the new macro expansion Ideal phases OK, or should we change anything?
Testing:
- [GitHub Actions](https://github.com/dlunde/jdk/actions/runs/7756242938)
- tier1 to tier5 on windows-x64, linux-x64, linux-aarch64, macosx-x64, and macosx-aarch64.
- Verified on jdk-22+17 that the new stress option randomly triggers the problem with `testLoadVectorMasked` in [JDK-8317121](https://bugs.openjdk.org/browse/JDK-8317121).
- Tested that thousands of graphs are correctly opened and visualized with IGV.
-------------
Commit messages:
- Add StressMacroExpansion
Changes: https://git.openjdk.org/jdk/pull/17684/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17684&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8317349
Stats: 310 lines in 17 files changed: 127 ins; 83 del; 100 mod
Patch: https://git.openjdk.org/jdk/pull/17684.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17684/head:pull/17684
PR: https://git.openjdk.org/jdk/pull/17684
More information about the hotspot-compiler-dev
mailing list