[vectorIntrinsics] RFR: Refactor JVM Interface

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Wed Mar 25 10:22:01 UTC 2020


Hi Sandhya,

> The vector api tests pass on all Intel platforms with this patch.

Thank you!

> Only one minor build issue was there due to a last remaining UseVectorApiIntrinsics use in stubGenerator_x86_64.cpp.

Good catch. Fixed.

> The patch also fixes one long standing vbox related issue that we were seeing on one of our platforms.

Can you elaborate here a bit, please? Is it related to missing safepoint 
polls?

> Please go ahead and check in.

Pushed.

Best regards,
Vladimir Ivanov

> -----Original Message-----
> From: panama-dev <panama-dev-bounces at openjdk.java.net> On Behalf Of Vladimir Ivanov
> Sent: Tuesday, March 24, 2020 2:07 PM
> To: panama-dev <panama-dev at openjdk.java.net>
> Subject: [vectorIntrinsics] RFR: Refactor JVM Interface
> 
> http://cr.openjdk.java.net/~vlivanov/panama/vector/new_jvm_interface/webrev.00/
> 
> (First cleanup pass over the JVM implementation.
> The focus is on JVM-JDK interface.)
> 
> New JVM interface is minimal and contains intrinsics, well-known classes, and opcode declarations. It resides in java.base
> (jdk.internal.vm.vector.VectorSupport) and exports the interface to jdk.incubator.vector module.
> 
> JVM doesn't need to know about typed vectors anymore: VectorPayload, VectorMask, and VectorShuffle are enough to represent all interesting cases and provide enough information to the JVM how to handle vector
> classes:
> 
>     - VectorPayload class represents vector values which are amenable to aggressive box elimination transformation
>        * vector on-heap representation remains primitive array-backed;
>        * classes which extend VectorPayload should declare 2 static fields (VLENGTH and ETYPE) which describe vector on-heap representation to the JVM (array length and its element type);
> 
>     - VectorShuffle and VectorMask mark vector shuffles and masks for the JVM;
> 
>     - VectorSpecies and Vector are there to enhance type checking of JVM intrinsic usages;
> 
> 
> Also, additional refactorings/fixes:
> 
>     * merged reinterpret and cast intrinsics into one (convert)
> 
>     * refactored rematerialization support
> 
>     * don't remove unused VectorBoxAllocate nodes, but replace them with
> safepoints
> 
>     * VM vector support is turned off by default, but automatically
> enabled when user adds jdk.incubator.vector incubator module to the graph
> 
>     * multiple minor fixes and cleanups along the way
> 
> Testing: jdk/incubator/vector tests
> 
> Best regards,
> Vladimir Ivanov
> 


More information about the panama-dev mailing list