RFR: 8319822: Use a linear-time algorithm for assert_different_registers() [v12]
Thomas Stuefe
stuefe at openjdk.org
Mon Jun 3 09:26:12 UTC 2024
On Mon, 3 Jun 2024 09:00:38 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Andrew Haley has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 19 additional commits since the last revision:
>>
>> - Merge branch 'clean' into different-regs
>> - Review feedback
>> - Review feedback
>> - Update src/hotspot/share/asm/register.hpp
>>
>> Co-authored-by: Stefan Karlsson <stefan.karlsson at oracle.com>
>> - Review feedback
>> - Review feedback
>> - Review feedback
>> - Merge branch 'different-regs' of https://github.com/theRealAph/jdk into different-regs
>> - Update src/hotspot/share/asm/register.hpp
>>
>> Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>
>> - Merge branch 'clean' into different-regs
>> - ... and 9 more: https://git.openjdk.org/jdk/compare/8fe7e1ce...c9fc63d7
>
> src/hotspot/share/asm/register.hpp line 96:
>
>> 94: template <class RegImpl>
>> 95: class AbstractRegSet {
>> 96: size_t _bitset;
>
> Why couple the number of possible registers to the memory size? Why not uint64_t?
64-bit makes sense.
I think this may have been broken for ppc where the number of vector registers can exceed 32 (https://github.com/openjdk/jdk/blob/91101f0d4fc8e06d0d74e06361db6ac87efeeb8e/src/hotspot/cpu/ppc/register_ppc.hpp#L378)
Unless I am mistaken, `assert_different_registers`, if applied to VSR32 and up, would never have fired.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16617#discussion_r1624077001
More information about the hotspot-compiler-dev
mailing list