RFR: 8319111: Mismatched MemorySegment heap access is not consistently intrinsified [v2]

Jatin Bhateja jbhateja at openjdk.org
Fri Dec 1 08:39:21 UTC 2023


> Patch enables intrinsification of fromMemorySegment, intoMemorySegment APIs and their masked variants for mismatched memory segments i.e. heap based memory segments whose backing storage type differs from the vector type in which they are loaded to or stored from.
> 
> A load from a mismatched segment first moves the contents into type compatible vector followed by reinterpretation to desired vector type. This facilitates value forwarding from a preceding vector store as alias indices are computed using backing storage type.
> 
> Mismatched masked vector loads and stores are performed at byte granularity, this handles both narrowing and widening scenarios where vector lane size is smaller than backing storage element type and vice versa.
> 
> Following are the performance numbers of and existing JMH micro.
> 
> ![image](https://github.com/openjdk/jdk/assets/59989778/a0b177af-78ca-4ac8-b6b0-bfe3655b16a6)
> 
> Please review and share your feedback.
> 
> Best Regards,
> Jatin

Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:

  Review suggestions incorportated.

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/16888/files
  - new: https://git.openjdk.org/jdk/pull/16888/files/a8df0c99..935f4e07

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=16888&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16888&range=00-01

  Stats: 185 lines in 13 files changed: 8 ins; 4 del; 173 mod
  Patch: https://git.openjdk.org/jdk/pull/16888.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16888/head:pull/16888

PR: https://git.openjdk.org/jdk/pull/16888


More information about the hotspot-compiler-dev mailing list