Closed DanielKristofKiss closed 2 months ago
cc: @ilinpv @jroelofs @andrewcarlotti
Looks reasonable to me.
Ditto. Thank you!
Hi @DanielKristofKiss , can you please give more context to this change? Why is it necessary?
Hi @vhscampos, One of the reasons: https://github.com/llvm/llvm-project/issues/79659
If the macro reports the version then a program code could check the support level. Later if we introduce new features to the spec then we would have a way to detect it. Also make easier to check feature level support to ( .e.g. arch FeatureX only introduced in 2025 release of ACLE )
I'm not sure this is a good idea. __HAVE_FUNCTION_MULTI_VERSIONING
is a name that reflects a binary choice. Even having it as a bitmask would be a stretch (the previously suggested approach in https://github.com/llvm/llvm-project/issues/79659).
If we want to gate things behing conditions such as this:
#if __HAVE_FUNCTION_MULTI_VERSIONING >= __ARM_ACLE_VERSION(2024, 1, 0 )
Then we should just use directly:
#if __ARM_ACLE >= __ARM_ACLE_VERSION(2024, 1, 0 )
I am not sure that using __ARM_ACLE >= __ARM_ACLE_VERSION(2024, 1, 0 )
directly solves the problem that I have:
the presence of compilers in the wild that claim to but don't actually support [FMV] means we don't have a great way to gate usage of this feature via the preprocessor.
For context, in clang, support for FMV depends on:
which are both orthogonal to the implemented ACLE version.
Sorry for the long delay. I had some discussions internally but the outcome got lost in the process.
I reckon that __HAVE_FUNCTION_MULTI_VERSIONING is a macro whose value should remain a boolean. Its name has the explicit meaning of a boolean piece of information.
For the purpose intended in this change, I recommend that a new macro is created with a name similar to __MULTI_VERSIONING_SUPPORT_LEVEL, with a value derived from the relevant ACLE version:
#define __MULTI_VERSIONING_SUPPORT_LEVEL __ARM_ACLE_VERSION(2024, 1, 0)
works for me
@labrinea Can you please review this as well once you're able to?
Lgtm
Checklist: (mark with
X
those which apply)SPDX-FileCopyrightText
lines on top of any file I have edited. Format isSPDX-FileCopyrightText: Copyright {year} {entity or name} <{contact informations}>
(Please update existing copyright lines if applicable. You can specify year ranges with hyphen , as in2017-2019
, and use commas to separate gaps, as in2018-2020, 2022
).Copyright
section of the sources of the specification I have edited (this will show up in the text rendered in the PDF and other output format supported). The format is the same described in the previous item.draftversion
is set totrue
in the YAML header of the sources of the specifications I have modified.