RFR: 8372845: C2: Fold identity hash code if object is constant [v5]

Chen Liang liach at openjdk.org
Mon Jan 26 18:33:18 UTC 2026


> Folding identity hash as constant if the incoming argument is constant would be useful for quick map lookups, such as for the [Classifier proposal](https://openjdk.org/jeps/8357674). Currently, identity hash is not constant because it loads the object header/mark word. We can add an explicit bypass to load an existing hash eagerly instead.

Chen Liang 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 14 additional commits since the last revision:

 - Copyright year, code style improvements
 - Merge branch 'master' of https://github.com/openjdk/jdk into fix/identity-hash-const
 - Move test, fix merge garbage
 - Merge branch 'master' of https://github.com/openjdk/jdk into fix/identity-hash-const
 - Merge branch 'master' of https://github.com/openjdk/jdk into fix/identity-hash-const
 - Typo
 - assert
 - refactorings
 - Typo
 - Merge branch 'master' of https://github.com/openjdk/jdk into fix/identity-hash-const
 - ... and 4 more: https://git.openjdk.org/jdk/compare/a4c5fb85...e33f01e0

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/28589/files
  - new: https://git.openjdk.org/jdk/pull/28589/files/67a3954f..e33f01e0

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28589&range=04
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28589&range=03-04

  Stats: 95520 lines in 3917 files changed: 47645 ins; 16634 del; 31241 mod
  Patch: https://git.openjdk.org/jdk/pull/28589.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28589/head:pull/28589

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


More information about the hotspot-runtime-dev mailing list