RFR: 8319813: Remove upper limit on number of compiler phases in phasetype.hpp
Daniel Lundén
duke at openjdk.org
Mon Nov 20 09:10:49 UTC 2023
This changeset removes the implicit upper limit on the number of compiler phases in `phasetype.hpp`. The limit was due to the 64-bit mask used in `Compile::should_print_phase`, causing the `assert(cpt < 64, "out of bounds");` in `phasetype.hpp` to trigger when increasing the number of phases to more than 64.
Changes:
- Replace the 64-bit mask with a bit map (`utilities/bitMap.hpp`).
- Clean up the `PhaseNameValidator` interface by allocating the mask internally.
- Move the check for whether a mask is non-zero ("is set") into `PhaseNameValidator`.
- Add a method `should_print_phase` to `DirectiveSet`, simplifying the `if`-condition in `Compile::should_print_phase`.
### Testing
Platforms: windows-x64, linux-x64, linux-aarch64, macosx-x64, macosx-aarch64.
- `tier1`
- HotSpot parts of `tier2` and `tier3`
-------------
Commit messages:
- Rename to is_mask_set
- Cleanup
- Add directive->should_print_phase
- Change to CHeapBitMap
- Change to BitMap
- Simplify with typedef
- First attempt
Changes: https://git.openjdk.org/jdk/pull/16729/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16729&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8319813
Stats: 48 lines in 6 files changed: 18 ins; 10 del; 20 mod
Patch: https://git.openjdk.org/jdk/pull/16729.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16729/head:pull/16729
PR: https://git.openjdk.org/jdk/pull/16729
More information about the hotspot-compiler-dev
mailing list