RFR: 8303415: Add VM_Version::is_intrinsic_supported(id) [v2]
Vladimir Kozlov
kvn at openjdk.org
Thu Mar 9 05:43:06 UTC 2023
On Thu, 9 Mar 2023 02:34:34 GMT, David Holmes <dholmes at openjdk.org> wrote:
> I'm a bit confused about the core issue of "Add VM_Version::is_intrinsic_supported(id)" because AFAICS this was only added for x86 ??
Currently the only way to check in shared code if a platform supports intrinsic is to add new flag which is set in platform specific code based on CPU instructions set. And we have "ton" of such global flags already: [globals.hpp#L320](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/globals.hpp#L320)
I don't want to add new flag for each new intrinsic. I propose to add new VM_Version method `is_intrinsic_supported(id)` which can be called from shared code.
Currently only new `float16ToFloat` intrinsic does not corresponding flag for which I can use this new API.
The intrinsic is implemented only on Aarch64 (unconditionally) and on x86 (if it has corresponding AVX512 or F16C instructions). Because of that currently we need to check `float16ToFloat` support only for x86.
-------------
PR: https://git.openjdk.org/jdk/pull/12858
More information about the hotspot-compiler-dev
mailing list