[lworld] RFR: 8311219: [lworld] VM option "InlineFieldMaxFlatSize" cannot work well
Jatin Bhateja
jbhateja at openjdk.org
Mon Jul 24 04:02:02 UTC 2023
On Mon, 24 Jul 2023 02:27:53 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
>>> The state of Valhalla document is not a specification, but a document about the general design of the Valhalla features in the VM. Currently, fields with L-descriptors are never flattened even the final ones. There are some non-trivial problems to be solved regarding their status before initialization and until we have a good solution to those problems, the safest option is to not flattened them.
>>
>> null initialized L descriptor final fields may be tricky to handle, being pessimist looks appropriate in this case.
>
> Sounds reasonable to me! It also reminds me that the value object JEP [1] said a value object can only be scalarized when it is on stack or passed through a method call in C2 compiler.
>
> So maybe changing to `!(too_big_to_flatten | too_atomic_to_flatten | too_volatile_to_flatten)` is safer for current status. WDYT @fparain @jatin-bhateja ?
>
> [1] https://openjdk.org/jeps/8277163
Looks fine to me, the case where we are making this check is meant for T_PRIMITIVE_OBJECTS (Q descriptor value object), thus as per above understanding (1 and 2), final constraint can be removed. Value object anyways carry an L descriptor (T_OBJECT) and hence are currently not being handled.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/888#discussion_r1271706275
More information about the valhalla-dev
mailing list