[lworld] RFR: 8370195: [lworld] Constant-fold _layout_kind loads from constant FlatArrayKlass

Quan Anh Mai qamai at openjdk.org
Sun Oct 19 17:19:19 UTC 2025


Hi,

The load to FlatArrayKlass::_layout_kind can be constant-folded if the receiver is a constant. This eliminates all checks when the array type is known statically or speculated correctly.

Please leave your reviews, thanks a lot.

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

Commit messages:
 - constant fold layout kind loads

Changes: https://git.openjdk.org/valhalla/pull/1687/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1687&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8370195
  Stats: 137 lines in 4 files changed: 135 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/valhalla/pull/1687.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1687/head:pull/1687

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


More information about the valhalla-dev mailing list