RFR: 8319822: Use a linear-time algorithm for assert_different_registers() [v12]

Thomas Stuefe stuefe at openjdk.org
Mon Jun 3 14:01:04 UTC 2024


On Mon, 3 Jun 2024 13:03:22 GMT, Andrew Haley <aph at openjdk.org> wrote:

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

Okay. Well, if we have a static assert, we will notice if we have more registers than fit the bitset.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16617#discussion_r1624510457


More information about the hotspot-compiler-dev mailing list