RFR 8223345 [lworld] Implement ValueTypeReturnedAsFields for C1
Tobias Hartmann
tobias.hartmann at oracle.com
Wed May 8 07:20:41 UTC 2019
Hi Ioi,
On 04.05.19 02:13, Ioi Lam wrote:
> https://bugs.openjdk.java.net/browse/JDK-8223345
> http://cr.openjdk.java.net/~iklam/valhalla/8223345-c1_return_vt_as_fields.v01/
>
> The implementation is pretty straight-forward as most of the work of packing/unpacking is done
> inside runtime functions, the same as the interpreter.
>
> I refactored MacroAssembler::store_value_type_fields_to_buf so that it can be reused between the
> interpreter and C1.
Looks good to me.
> One problem with the current way of using the runtime functions is that it's neither fast, nor small
> :-(
>
> + For better performance, it might be better to do the packing/unpacking in-line.
> I'll leave that for future optimization.
Right, let's leave that for later.
> + On the other hand, if we want smaller code, I think the inline-allocation code can
> be moved into ValueKlass::pack_handler(). I might do that as a separate RFE.
The pack_handler is also used by C2 and there we might want the allocation to happen in compiled
code to allow optimizations. But we can investigate this as part of a separate RFE.
Thanks,
Tobias
> I've added FIXME comments in the code for the above.
>
> Thanks
> - Ioi
More information about the valhalla-dev
mailing list