RFR: 8303415: Add VM_Version::is_intrinsic_supported(id)

David Holmes dholmes at openjdk.org
Thu Mar 9 04:35:07 UTC 2023


On Thu, 9 Mar 2023 03:59:35 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Okay but then why do we still need the parameter `is_virtual`?
>
> @dholmes-ora  I can remove parameter if I modify caller code like next:
> 
> -    is_available = compiler != NULL && compiler->is_intrinsic_available(mh, C->directive()) &&
> -                   compiler->is_virtual_intrinsic_supported(id, is_virtual);
> +    is_available = compiler != NULL && compiler->is_intrinsic_available(mh, C->directive());
> +    if (is_available && is_virtual) {
> +      is_available = compiler->is_virtual_intrinsic_supported(id);
> +    }
> 
> Will it satisfy you?

How many callers are there? From an API design perspective this method is either only for virtual intrinsics, so no parameter needed, or it is for general intrinsics and the parameter indicates what type.

-------------

PR: https://git.openjdk.org/jdk/pull/12858


More information about the hotspot-compiler-dev mailing list