[vectorIntrinsics] RFR: Refactor JVM Interface

Paul Sandoz paul.sandoz at oracle.com
Tue Mar 24 22:27:27 UTC 2020


Hi Vladimir,

Thanks for making such a significant cleanup.

Java side looks good.  

I browsed the HS side.  It looks like you greatly simplified some code, namely that which was gated by the old flag VectorAPIAggressiveReboxing.  Is that related to "don't remove unused VectorBoxAllocate nodes, but replace them with safepoints”?

Paul.

> On Mar 24, 2020, at 2:07 PM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
> 
> 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