Integrated: 8319822: Use a linear-time algorithm for assert_different_registers()
Andrew Haley
aph at openjdk.org
Wed Jun 5 17:13:04 UTC 2024
On Fri, 10 Nov 2023 15:46:59 GMT, Andrew Haley <aph at openjdk.org> wrote:
> At the present time, `assert_different_registers()` uses an O(N**2) algorithm in assert_different_registers(). We can utilize RegSet to do it in O(N) time. This would be a useful optimization for all builds with assertions enabled.
>
> In addition, it would be useful to be able to static_assert different registers.
>
> Also, I've taken the opportunity to expand the maximum size of a RegSet to 64 on 64-bit platforms.
>
> I also fixed a bug: sometimes `noreg` is passed to `assert_different_registers()`, but it may only be passed once or a spurious assertion is triggered.
This pull request has now been integrated.
Changeset: 9b3694c4
Author: Andrew Haley <aph at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/9b3694c4fcc3cf46c0d827427ae8aadb477e8e22
Stats: 69 lines in 4 files changed: 33 ins; 0 del; 36 mod
8319822: Use a linear-time algorithm for assert_different_registers()
Reviewed-by: kbarrett, stefank, stuefe
-------------
PR: https://git.openjdk.org/jdk/pull/16617
More information about the hotspot-compiler-dev
mailing list