[lworld+vector] RFR: 8307715: Integrate VectorMask with value/primitive classes

Xiaohong Gong xgong at openjdk.org
Tue May 16 04:15:01 UTC 2023


This patch changes the Vector API java side and hotspot
compiler code to make the `VectorMask` operations work well
after integrating with valhalla value/primitive classes.

Java side changes include:
 - Define the concrete VectorMask classes as value class.
 - Define the payload field type as primitive classes, which
   defines `MultiField` annotated field to save the element
   values.
 - Change all the relative API implementations, which use
   Unsafe APIs to access the new payload.
 - Move several VectorMask default operations to the abstract
   super class.

Compiler changes include:
 - Enable intrinsification for VectorMask related operations.
   Mask input/output of `VectorBox/VectorUnbox` is changed to
   the boolean vector format, to adapt C2's `InlineTypeNode`
   and new `VectorBox` features. Note that the mask input/output
   is a normal vector or predicate before.
 - Refine `VectorBox` expanding logic to make it right when the
   primitive payload instance is not flattened.
 - Minor code cleanup.

Basic VectorMask jtreg tests pass with
"`-XX:+UnlockExperimentalVMOptions -XX:-EnableVectorSupport`",
and the basic unit tests work well after enabling vector support.

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

Commit messages:
 - 8307715: Integrate VectorMask with value/primitive classes

Changes: https://git.openjdk.org/valhalla/pull/845/files
 Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=845&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8307715
  Stats: 3310 lines in 47 files changed: 364 ins; 1436 del; 1510 mod
  Patch: https://git.openjdk.org/valhalla/pull/845.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/845/head:pull/845

PR: https://git.openjdk.org/valhalla/pull/845



More information about the valhalla-dev mailing list