[lworld] RFR: 8252506: [lworld] Multiple issues with C2's arraycopy intrinsic [v2]
Tobias Hartmann
thartmann at openjdk.java.net
Mon Sep 7 09:08:32 UTC 2020
> This patch fixes multiple issues in C2's arraycopy/copyof/clone intrinsics:
> - Flat inline type arrays containing oops might be copied without GC barriers.
> - Missing membarrier in copyOf code at macro expansion
> - We can often avoid flat/null-free checks by relying on the src <: dst subtype check
> - We often know at parse time that a flat array does not contain oops and should make use of that information
> - And more.. Hopefully the comments in the code are self-explanatory
>
> Other changes:
> - generic_arraycopy stub needs to handle flat/null-free inline type arrays
> - Bail if src is flat or dst is flat/null-free
> - Primitive array verification code is broken because array tag contains more bits
> - The "Load layout helper" comment needs adjustment as well but I'll wait with that until we've moved bits to the mark
> word
> - C1 arraycopy intrinsic does not need to check arguments to generic_arraycopy stub (moved checks below)
> - Added asserts and runtime verification code to catch issues earlier
> - Added lots of test for all issues I've found and new IR matching rules to verify that all arraycopy optimizations work
> as expected
> - Some refactoring
>
> I've identified some remaining optimization opportunities and marked them with "TODO 8251971" in code and tests.
Tobias Hartmann 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 two additional commits since
the last revision:
- Merge branch 'lworld' into JDK-8252506
- 8252506: [lworld] Multiple issues with C2's arraycopy intrinsic
-------------
Changes:
- all: https://git.openjdk.java.net/valhalla/pull/178/files
- new: https://git.openjdk.java.net/valhalla/pull/178/files/20ed4d33..9ac5e92c
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=178&range=01
- incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=178&range=00-01
Stats: 35 lines in 2 files changed: 24 ins; 6 del; 5 mod
Patch: https://git.openjdk.java.net/valhalla/pull/178.diff
Fetch: git fetch https://git.openjdk.java.net/valhalla pull/178/head:pull/178
PR: https://git.openjdk.java.net/valhalla/pull/178
More information about the valhalla-dev
mailing list