[lworld+vector] RFR: 8311675: [lworld+vector] Max Species support. [v3]

Jatin Bhateja jbhateja at openjdk.org
Mon Oct 16 08:14:18 UTC 2023


On Mon, 16 Oct 2023 07:33:43 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> Array of vector may be heterogeneous in nature where each element points to a vector of different shape, thus array flatten do not make much sense to vectors. In additional during type resolution flat_array flag is set for imbalanced Phi (having different type of inputs e.g. VectorPayload64 and VectorPayload128) even though Phi's type is lower common ancestor type of participating inputs i.e., VectorPayload which itself is not an inlinetype, this leads to assertion failures in downstream flow.
>> 
>> https://github.com/openjdk/valhalla/blob/lworld/src/hotspot/share/opto/type.cpp#L4636
>> 
>> Instead of making a wider change in type resolution, where we flat_array setting also take into account exact type of PhiNode, I prefer to restrict array flatten for vectors.
>
> Thanks for the explanation! Seems it also causes the jvm crash in `VectorXXXConversionTests`, but I didn't figure out the root cause yet.  Is it possible supporting the flat array for vector objects with some fixes in future? We may lose the performance with this change, right?

Since we never expose concrete vector types to users hence its only possible to create an array of abstract vector references which can be heterogeneous. This is different from an array of value types which are implicitly final classes and may be flattened into a compact layout since such an array will be homogeneous in nature.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/931#discussion_r1360285556



More information about the valhalla-dev mailing list