[lworld+fp16] RFR: 8333852: Allow flat array layout for value based classes.

Jatin Bhateja jbhateja at openjdk.org
Tue Jul 2 11:56:08 UTC 2024


Patch enables flat runtime layout for value based classes decorated with following annotations.
  1. @NullRestrictedArray:  Newly added annotation, ensures flat array elements are never assigned a null value during the lifetime of array, a violation to this rule results into a NullPointerException.
  2. @ImplicitylConstructible: Ensures default value assignment to flat array element at the time of new allocation.
  3. @LooselyConsistentValue:  Relaxes strict atomic update constraint of value objects.

In addition, all primitive box classes when annotated with #1 and #2 assume atomic update since they wrap around primitive type fields.

With this patch, an array of Float16 type has flay runtime layout which enables auto-vectorization of FP16 operations.

Best Regards,
Jatin

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

Commit messages:
 - Test null assignment to flat arrays
 - 8333852: Allow flat array layout for value based classes.

Changes: https://git.openjdk.org/valhalla/pull/1154/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1154&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8333852
  Stats: 271 lines in 17 files changed: 260 ins; 2 del; 9 mod
  Patch: https://git.openjdk.org/valhalla/pull/1154.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1154/head:pull/1154

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


More information about the valhalla-dev mailing list