First C2 prototype for value types
tobias.hartmann at oracle.com
Fri Oct 7 16:20:51 UTC 2016
On 07.10.2016 16:43, Frederic Parain wrote:
> Hi Tobias,
> I can be the sponsor for your changes.
> Let we know when they are ready for pushing.
Thanks! In my opinion the changes are ready to push.
As I mentioned, the implementation is experimental but shouldn't affect/break any existing code.
> On 10/07/2016 10:11 AM, Tobias Hartmann wrote:
>> 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,
More information about the valhalla-dev