Update on generalized intrinsics experiment

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Fri Dec 22 19:01:45 UTC 2017


Here's the latest set of patches (against panama/dev):
 
http://cr.openjdk.java.net/~vlivanov/panama/vector.generalized_intrinsics.03/all

I tried to keep intrinsics separate and accompany each with relevant 
code (as deleted):

(0) Vector.length()
 
http://cr.openjdk.java.net/~vlivanov/panama/vector.generalized_intrinsics.03/length/

   Replaced length() with pure Java implementation. Static final fields 
are treated as constants, so not much benefit in keeping it as an intrinsic.


(1) VI.binaryOp()
 
http://cr.openjdk.java.net/~vlivanov/panama/vector.generalized_intrinsics.03/binary/ 


   Implemented add(), sub(), mul(), div(), and(), or(), xor().


(2) VI.broadcastCoerced()
 
http://cr.openjdk.java.net/~vlivanov/panama/vector.generalized_intrinsics.03/broadcast

   Chose coerced (to long) version (though boxed version works fine as 
well [1]). Implemented zero() & broadcast().


(3) VI.load()/store()
 
http://cr.openjdk.java.net/~vlivanov/panama/vector.generalized_intrinsics.03/memory/

   Implemented fromArray()/intoArray().


(4) VI.reductionCoerced()
 
http://cr.openjdk.java.net/~vlivanov/panama/vector.generalized_intrinsics.03/reduction/

   Result value is coerced to long bits. Implemented addAll(), mulAll().

Test results look fine, but from code quality perspective, absence of 
rematerialization support at safepoints keep many allocations alive.


Also, started experimenting with masks:
 
http://cr.openjdk.java.net/~vlivanov/panama/vector.generalized_intrinsics.03/mask/

It's not complete yet, but nice thing is that existing intrinsics can be 
extended to masks as well.

Let me know what do you think about that. Thanks!

Best regards,
Vladimir Ivanov

[1] 
http://cr.openjdk.java.net/~vlivanov/panama/vector.generalized_intrinsics.broadcast/


More information about the panama-dev mailing list