RFR: 8352620: C2: rename MemNode::memory_type() to MemNode::value_basic_type()

Saranya Natarajan duke at openjdk.org
Fri Apr 11 08:29:11 UTC 2025


Description: The current name MemNode::memory_type() is misleading because the returned type is a property of the value that is loaded/stored, not the memory that is accessed. Usually, the two of them match, but for mismatched memory accesses (arising e.g. from using Unsafe or memory segments) they might differ, e.g. one might store a value of type 'short' into an array of elements of type 'long'. The proposal was to rename MemNode::memory_type() to MemNode::value_basic_type() to clarify these cases.

Solution: Replaced all occurrence of MemNode::memory_type() with MemNode::value_basic_type()

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

Commit messages:
 - Merge branch 'master' into JDK-8352620
 - removing comment
 - Merge branch 'master' into JDK-8352620
 - 8352620: C2: rename MemNode::memory_type() to MemNode::value_basic_type()

Changes: https://git.openjdk.org/jdk/pull/24427/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24427&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8352620
  Stats: 41 lines in 5 files changed: 4 ins; 1 del; 36 mod
  Patch: https://git.openjdk.org/jdk/pull/24427.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24427/head:pull/24427

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


More information about the hotspot-compiler-dev mailing list