MVT-based vectors: first stab

Roland Westrelin rwestrel at
Mon Jul 3 12:13:50 UTC 2017

> 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.


More information about the valhalla-dev mailing list