Integrated: 8319813: Remove upper limit on number of compiler phases in phasetype.hpp

Daniel Lundén duke at openjdk.org
Thu Nov 23 08:45:21 UTC 2023


On Mon, 20 Nov 2023 09:04:27 GMT, Daniel Lundén <duke at openjdk.org> wrote:

> 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`

This pull request has now been integrated.

Changeset: 8db7bad9
Author:    Daniel Lundén <daniel.lunden at oracle.com>
Committer: Emanuel Peter <epeter at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/8db7bad992a0f31de9c7e00c2657c18670539102
Stats:     46 lines in 6 files changed: 21 ins; 6 del; 19 mod

8319813: Remove upper limit on number of compiler phases in phasetype.hpp

Reviewed-by: chagedorn, rcastanedalo, epeter

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

PR: https://git.openjdk.org/jdk/pull/16729


More information about the hotspot-compiler-dev mailing list