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'.
This RFE proposes renaming 'MemNode::memory_type()' to 'MemNode::value_basic_type()' to clarify the intended meaning in these cases.
The rename was suggested by [~qamai] in the context ofJDK-8351468, see https://github.com/openjdk/jdk/pull/24005#issuecomment-2724445592.
This RFE proposes renaming 'MemNode::memory_type()' to 'MemNode::value_basic_type()' to clarify the intended meaning in these cases.
The rename was suggested by [~qamai] in the context of
- relates to
-
JDK-8351468 C2: array fill optimization assigns wrong type to intrinsic call
-
- Resolved
-