[lworld] RFR: 8311219: [lworld] VM option "InlineFieldMaxFlatSize" cannot work well [v4]

Tobias Hartmann thartmann at openjdk.org
Thu Sep 7 08:20:11 UTC 2023


On Thu, 7 Sep 2023 07:56:11 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> src/hotspot/share/classfile/fieldLayoutBuilder.cpp line 761:
>> 
>>> 759:             // volatile fields are currently never flatten, this could change in the future
>>> 760:           }
>>> 761:           if (!(too_big_to_flatten | too_atomic_to_flatten | too_volatile_to_flatten)) {
>> 
>> Please also add an IR framework test to check primitive class final/non-final field flattening, given that InlineTypeNode are removed during Optimization hence such a check has to be done on post Parse IR.
>
> The main problem for me is how to check the flatten status for an `InlineTypeNode`. Maybe we can check the decode operation generated by the field accessing (or loading) to an primitive class field. Any better idea for this?

Couldn't you just check that there is no oop load for that particular field, i.e., no indirection to load the fields from a heap buffer?

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/888#discussion_r1318253311



More information about the valhalla-dev mailing list