First C2 prototype for value types

Frederic Parain frederic.parain at
Fri Oct 7 14:43:43 UTC 2016

Hi Tobias,

I can be the sponsor for your changes.
Let we know when they are ready for pushing.


On 10/07/2016 10:11 AM, Tobias Hartmann wrote:
> Hi,
> I implemented a first very basic C2 prototype implementation of value types:
> The changes mostly affect the C2 frontend and do not affect any non VT (byte-)code or other VM functionality.
> Here's a summary:
> - Introduced ciValueKlass to represent a valueKlass in C2 and provide access to the value type field layout.
> - Introduced a new Type TypeValueType and TypeValueTypePtr to represent a value type and a corresponding oop to the heap allocated value type in C2's type system.
> - Introduced a ValueTypeNode to represent a value type in the C2 IR. It's a TypeNode with type TypeValueType and has the oop and the field values as input nodes.
> - Support for vnew, vreturn, vgetfield, vload, vstore.
> - Support for passing value types from interpreter to C2 compiled code and vice versa. This is done via oops.
> - Other VT bytecodes are treated as corresponding Java object bytecodes (just for now, so we know where we need to make future changes)
> - No support for VT arrays and flattening yet.
> - No "real" optimizations.
> I implemented a jtreg test suite to ease testing of the C2 implementation:
> It supports basic matching on the C2 IR. The tests under
> // ========== Test definitions ==========
> work and C2 generates code for them. The C2 IR is printed for each test.
> Please be aware that this implementation is *very* limited and the only thing that should work are the tests in the suite. There are sill lot's of TODOs and FIXMEs but I would like to push this early version to allow other team members to build upon.
> I need a sponsor for this since I'm not Valhalla author/committer.
> Best regards,
> Tobias

More information about the valhalla-dev mailing list