Hi Kyrylo,
(resending due to missing CC)
On 09/01/2025 10:41, Kyrylo Tkachov wrote:
diff --git a/gcc/config/aarch64/aarch64.cc
b/gcc/config/aarch64/aarch64.cc
index 91de13159cb..afc0749fd67 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -20347,6 +20347,9 @@ aarch64_mangle_decl_assembler_name (tree decl,
tree id)
if (TREE_CODE (decl) == FUNCTION_DECL
&& DECL_FUNCTION_VERSIONED (decl))
{
+ warning_at(DECL_SOURCE_LOCATION(decl), OPT_Wexperimental_fmv_target,
+ "function multi-versioning support is experimental");
+
Some wording nits.
Space before the “(“.
Thank you, I will fix.
I think there should be no ‘-‘ here to keep consistent with the ACLE
wording. Not sure whether Function Multi Versioning should be
capitalised. What do you think?
Ah yes, best to follow the ACLE for formatting I suppose. I will
capitalise and remove the hyphen to match.
diff --git a/gcc/config/aarch64/aarch64.opt
b/gcc/config/aarch64/aarch64.opt
index 36bc719b822..55670eeb74f 100644
--- a/gcc/config/aarch64/aarch64.opt
+++ b/gcc/config/aarch64/aarch64.opt
@@ -431,3 +431,7 @@ handling. One means we try to form pairs involving
one or more existing
individual writeback accesses where possible. A value of two means we
also try to opportunistically form writeback opportunities by folding in
trailing destructive updates of the base register used by a pair.
+
+Wexperimental-fmv-target
+Target Var(warn_experimental_fmv) Warning Init(1)
+Warn about usage of experimental function multi versioning
Should this have aarch64 in the name somehow? It feels awkward to have
aarch64 in the name, but the option is not generic.
I was following the Wopenacc-dims in designing this which is a target
specific option for gcn
that isn't named overly specifically.
I also don't think this necessarily has to be limited to Aarch64. I'm
aware other ports have
specified the behaviour of target_version like Aarch64 has which GCC
currently doesn't conform to
and so may want to issue the same warning.
In any case, this should be documented in invoke.texi.
Will send a patch adding this.
I also think that from a user experience POV if they get this warning
they may ask what the recommendation is.
Should they change their source? Be prepared that the spec will change
in future releases??
The documentation should give some guidance
I have added to the warning (in upcoming patch) that the behaviour is
likely to change.
I will also add similar to the documentation.
Thank you for the feedback! I will get an updated patch to you shortly.
Alfie Richards