RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

Magnus Ihse Bursie ihse at openjdk.org
Thu Nov 23 13:54:09 UTC 2023


On Thu, 23 Nov 2023 08:40:57 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> Thanks for the advice! I will take a consideration for it.
>
>> Thirdly, I do not like at all how you just come crashing in setting -march like that. The -march flag is handled by FLAGS_SETUP_ABI_PROFILE.
> 
> `-march=armv8-a+sve` is just used in this new added module, which may not expect to be used for other libraries. Per my understanding, flags handled by `FLAGS_SETUP_ABI_PROFILE` is not used for a specified module? 
> 
>> Actually, now that I think of it, this is just completely wrong! You are checking on features on the build machine, to determine what target machine code to generate, with no way to override.
> 
> Yes, that's be a risk, although the usage to the SVE functions are controlled by SVE feature as well in runtime. I need time to find a better solution.

It does not matter if you set the -march on just part of the build. Actually, there is no point in doing so. Either the JDK is run on a machine with the matching architecture, or it isn't. 

I don't know the details of what the aarch64 SVE feature means, but unless this is a special instance, any attempt to execute the compiled code on a machine that does not support that architecture will fail.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16234#discussion_r1403416310


More information about the build-dev mailing list