RFR: 8311932: Suboptimal compiled code of nested loop over memory segment [v3]
Roland Westrelin
roland at openjdk.org
Wed Nov 15 15:26:52 UTC 2023
> To enable the elimination of long range checks, the loop that contains
> the range checks is transformed into a loop nest and the range checks
> are changed to operate on int values computed before the loop is
> entered. This causes extra overhead out of loop and once, the range
> checks are eliminated, can only pay off if the loop is executed for
> long enough. This change disable the transformation if the trip count
> computed from profile data is too low. This came up with a
> MemorySegment API micro benchmarks and improves performance
> significantly.
Roland Westrelin has updated the pull request incrementally with three additional commits since the last revision:
- Update test/hotspot/jtreg/compiler/c2/irTests/TestLongRangeChecks.java
Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
- Update test/hotspot/jtreg/compiler/c2/irTests/TestLongRangeChecks.java
Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
- Update src/hotspot/share/opto/loopnode.cpp
Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16650/files
- new: https://git.openjdk.org/jdk/pull/16650/files/8a0dd862..192e2f4d
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16650&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16650&range=01-02
Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/16650.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16650/head:pull/16650
PR: https://git.openjdk.org/jdk/pull/16650
More information about the hotspot-compiler-dev
mailing list