RFR: 8319822: Use a linear-time algorithm for assert_different_registers() [v12]
Andrew Haley
aph at openjdk.org
Mon Jun 3 13:07:09 UTC 2024
On Mon, 3 Jun 2024 09:04:45 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> 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.
OK, I get it. I was sort-of thinking that on the 32-bit platforms we support we don't ever have more than 32 registers in a set, but maybe that's not true. I certainly don't want to slow down 32-bit platforms by burdening them with double-word operations for something that can never happen.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16617#discussion_r1624425123
More information about the hotspot-compiler-dev
mailing list