MVT-based vectors: first stab

Remi Forax forax at univ-mlv.fr
Mon Jul 3 13:06:00 UTC 2017


Rolad,
why a __Value is not represented by two fields too ?

A __Value is a value type with no statically known type so if can not be represented by two fields, it should be represented by 3 fields (2 fields + a pointer to the type).

Only the conversion to an Object (box) should allocate something.

regards,
Rémi

----- Mail original -----
> De: "Roland Westrelin" <rwestrel at redhat.com>
> À: "Vladimir Ivanov" <vladimir.x.ivanov at oracle.com>, valhalla-dev at openjdk.java.net
> Envoyé: Lundi 3 Juillet 2017 14:13:50
> Objet: Re: MVT-based vectors: first stab

>> My near-term plans are: (1) implement missing LF intrinsics and (2) look
>> into box elimination issues on JIT-compiler side.
> 
> The JIT handles value types as tuples of the fields of the value, we
> don't allocate buffers for the value types unless it's striclty needed
> and we shouldn't need escape analysis. When a value is passed around
> through method handle calls, we pass the tuple of fields around (still
> no allocation) but sometimes, the JIT expects an __Value at some point
> in the program (because lamdba forms use __Value) and __Value can only
> be a pointer so we have to allocate a buffer for the value type (mostly
> to keep the type system happy). In that case we rely on escape analysis
> to remove the allocation.
> 
> I suspect the extra allocations you're seeing are from those cases in LF
> where we allocate a buffer to hold a value type and escape analysis
> fails to remove the allocations. I more or less have a plan to take care
> of those allocations. I haven't had time to work on it yet.
> 
> Roland.


More information about the valhalla-dev mailing list