IntVector implementation
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Tue Apr 26 15:51:48 UTC 2016
Thanks for sharing it, Ian!
FYI I've just pushed register allocator aware code snippet prototype
into the panama forest [1] [2].
> I wanted to share my take on an IntVector implementation. This implementation is based on Vladimir's patchable code snippets, so it may not work with the current state of Panama. I'm not sure if the patchable version of snippets has been committed to versioning yet, and I will defer to Vladimir on if and when he finds posting patchable code snippets appropriate. Suffice it to say, we've found them pretty usable and flexible when it comes to code generation.
It looks very nice! I like how it shapes out.
I don't see any vector type checks in the code.
Java generics aren't enough to ensure type safety (Vector<Integer,
Shapes.S128Bit>). So, some vector operations should perform type checks
at runtime to ensure the parameters have compatible shape.
Have you had a chance to play with different vector sizes?
I'm curious how does the JIT behave when optimizing such checks.
Ideally, it should common the checks and perform them only once.
> I've posted the code in a colleague's OpenJDK share in a webrev here:
>
> http://cr.openjdk.java.net/~vdeshpande/Panama_Collaboration/webrev.00/
Do you mind if I integrate it into the panama forest?
Best regards,
Vladimir Ivanov
[1] http://hg.openjdk.java.net/panama/panama/hotspot/rev/fb6532ac7731
[2] http://hg.openjdk.java.net/panama/panama/jdk/rev/1a60ef85ddba
More information about the panama-dev
mailing list