RFR: 8319822: Use a linear-time algorithm for assert_different_registers() [v8]
Andrew Haley
aph at openjdk.org
Fri May 10 14:58:54 UTC 2024
> 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.
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 13 additional commits since the last revision:
- 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
- Review feedback.
- 8319822: Use a linear-time algorithm for assert_different_registers()
- 8319822: Use a linear-time algorithm for assert_different_registers()
- Cleanup, fix warning on Windows.
- Fix x86
- Bleurgh
- ... and 3 more: https://git.openjdk.org/jdk/compare/211fe58c...0037dd29
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16617/files
- new: https://git.openjdk.org/jdk/pull/16617/files/36f48ad0..0037dd29
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16617&range=07
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16617&range=06-07
Stats: 1504428 lines in 12564 files changed: 341226 ins; 719204 del; 443998 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