[lworld+vector] RFR: 8304310: Initial compilers and runtime handling for multifield backed vectors.
Xiaohong Gong
xgong at openjdk.org
Tue Mar 21 02:04:01 UTC 2023
On Mon, 20 Mar 2023 09:52:25 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> src/hotspot/share/opto/inlinetypenode.cpp line 518:
>>
>>> 516: // all the concrete vectors should be fully flattened.
>>> 517: value = value->bottom_type()->isa_vect() ? value : kit->gvn().transform(VectorNode::scalar2vector(value, vec_len, val_type, false));
>>> 518: assert(value->bottom_type()->isa_vect() && value->bottom_type()->is_vect()->length() == (uint)ft->bundle_size(), "");
>>
>> Is it possible that not all the multi-field values are the `value` here? For example, if the multi-fields in the InlineTypeNode have been changed before.
>
> I do not fully follow your comment, multifield is not a value type to begin with, it the container VectorPayload* which is primitive class, for value types any change of field will result into creation of new InlineType, since values are immutable.
I mean if the VectorPayload* is generated by calling APIs like "fromArray(), binaryOp(), etc.". So that not all the field values of the MultiField is the initial value (e.g. 0), and each field value (or lane) may be different. Since `scalar2vector` broadcasts the same value to each field (or lane), will this has issues?
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/833#discussion_r1142827714
More information about the valhalla-dev
mailing list