[lworld+vector] RFR: 8304310: Initial compilers and runtime handling for multifield backed vectors. [v14]

Xiaohong Gong xgong at openjdk.org
Wed May 10 10:08:51 UTC 2023


On Wed, 10 May 2023 09:57:45 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/vm/vector/VectorSupport.java line 246:
>> 
>>> 244:         @ForceInline
>>> 245:         public static VectorPayloadMF createVectPayloadInstance(Class<?> elemType, int length) {
>>> 246:             return newInstanceFactory(elemType, length);
>> 
>> Any reason that we define two methods to new the payload instance? Can remove this and call `newInstanceFactory()` directly?
>
> Just to give meaningful name to wrapper, both are anyways annotated by @ForceInline hence will always get inlined in caller context.

The reason that I asked this question is: when I was modifying the VectorMask related code, I will use `VectorPayloadMF.createVectPayloadInstance(...)` when I need to create a payload for mask. Then I was thinking maybe `VectorPayloadMF.newInstanceFactory()` is better with two reasons:

1. We have already contained "VectorPayloadMF" in the class name.
2. The later is shorter.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/833#discussion_r1189676570



More information about the valhalla-dev mailing list