RFR: 8319822: Use a linear-time algorithm for assert_different_registers()
Andrew Haley
aph at openjdk.org
Fri Nov 10 15:52:09 UTC 2023
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.
-------------
Commit messages:
- 8319822: Use a linear-time algorithm for assert_different_registers()
- Better
- Temp
Changes: https://git.openjdk.org/jdk/pull/16617/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16617&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8319822
Stats: 63 lines in 2 files changed: 38 ins; 0 del; 25 mod
Patch: https://git.openjdk.org/jdk/pull/16617.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16617/head:pull/16617
PR: https://git.openjdk.org/jdk/pull/16617
More information about the hotspot-compiler-dev
mailing list