[lworld+vector] RFR: Merge lworld
Xiaohong Gong
xgong at openjdk.org
Mon Jun 26 01:27:28 UTC 2023
On Sun, 25 Jun 2023 16:29:28 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
> > For the scalarization changes on multifields https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/hotspot/share/opto/inlinetypenode.cpp#L327, you'v assumed that multifields are used for `vector_payload` or `vector_payload_mf` classes. Although it is true currently, it will be more reasonable if we scalarize the `InlineTypeNode` without such assumptions. What about if multifields are used elsewhere?
>
> Yes, I plan to address it after this merge, currently there is a discrepancy b/w field count returned by _ciInstanceKlass::nof_nonstatic_fields()_ vs InlineTypeNode::field_count(), this is because ci* data model directly works over oops data model which is populated by classFileParser, thus a multifield is a regular field @multifield annotation, its only during c2 parsing we scalarize it.
>
> We will need to add a new interface to query supported vector size in ciInstance which is implemented by both the compilers, this will be used to return correct field count which matches with IR.
Could you please take a look at the similar changes in https://github.com/openjdk/valhalla/pull/863/files#diff-b0ea998b1ae6491c87dae54a2a70644f8e957e7f3522f780883d72fb29107aea, which I firstly get the `nof_nonstatic_fields()`, and then extend the fields by the secondary fields once the field is a multifield_base. Adding another interface in `ciInstanceKlass` sounds ok, but I don't think it's a good idea creating several similar interfaces. If the changes in https://github.com/openjdk/valhalla/pull/863 looks fine to you, I can rebase it once this PR is merged.
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/866#issuecomment-1606396811
More information about the valhalla-dev
mailing list