Update on generalized intrinsics experiment
Paul Sandoz
paul.sandoz at oracle.com
Fri Dec 22 20:10:28 UTC 2017
> On 22 Dec 2017, at 11:01, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
>
> Here's the latest set of patches (against panama/dev):
> http://cr.openjdk.java.net/~vlivanov/panama/vector.generalized_intrinsics.03/all
>
This is looking very promising. It’s pleasing to see code gen approach held up without modification.
From a code bloat perspective do you think it worth pushing op impls, where amenable, up to the abstract *Vector<S> types?
Paul.
> 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