RFR: 8370666: VectorAPI: Add clear comments for vector relative code in c2 [v3]
Jatin Bhateja
jbhateja at openjdk.org
Fri Jan 16 09:03:48 UTC 2026
On Wed, 14 Jan 2026 05:41:26 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
>> The VectorMask implementation in Vector API involves complex interactions between types, nodes, and platform-specific
>> features, making the related code in HotSpot difficult to understand and review.
>>
>> This patch adds comprehensive comments for vector mask related types, nodes, and methods in C2 to improve code clarity and
>> maintainability.
>>
>> Note: This patch only adds comments; no functional changes are made.
>
> Xiaohong Gong has updated the pull request incrementally with one additional commit since the last revision:
>
> Update comments in type.cpp
Thanks @XiaohongGong , looks good.
I have also created https://bugs.openjdk.org/browse/JDK-8375498 so that we enable dumping of VectorIR created though vector inline expanders similar to auto-vectorization.
src/hotspot/share/opto/vectornode.hpp line 57:
> 55: // operations. While BVectMask primarily represents mask values loaded from or
> 56: // stored to Java boolean memory, and is currently used in certain mask operations
> 57: // (i.e. VectorMaskOpNode).
You can also specify here that BVectMask is a specific representation tied to mask backing storage and VectorLoadMask and VectorStoreMask IR is needed to transform it to/from P/NVectMask
-------------
PR Review: https://git.openjdk.org/jdk/pull/29130#pullrequestreview-3669612253
PR Review Comment: https://git.openjdk.org/jdk/pull/29130#discussion_r2697542602
More information about the hotspot-compiler-dev
mailing list