[VectorAPI] Enhancement of floating-point math vector API implementation
Paul Sandoz
paul.sandoz at oracle.com
Fri Jan 6 19:59:05 UTC 2023
> On Jan 6, 2023, at 11:02 AM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
>
> As an idea for an incremental improvement, consider lifting native library linkage code from JVM into JDK code and refactor corresponding intrinsics (require new ones I believe) to accept the specialized entry point address of the correspoding vectorized math routine (instead of the operation code). Then C2 could use the address to generate direct leaf call into the stub.
>
> That would allow to make JVM code library-agnostic and abstract away all the differences between SVML and SLEEF libraries (and, in the future, any other library added as a backing implementation).
>
> On JDK level multiple plug-in implementations could be supported and the final decision what implementation to use is performed at runtime depending on the presence of required libraries or user choice.
>
Yes, users could plug in using service providers. We would need to be careful about potential abuses. Might need to be gated, perhaps by Panama’s command --enable-native-access flag.
Paul.
More information about the panama-dev
mailing list