]> git.ipfire.org Git - thirdparty/gcc.git/commit
targethooks: Change SAME_FUNCTION_VERSIONS hook to support checking mergeability
authorAlfie Richards <alfie.richards@arm.com>
Tue, 7 Oct 2025 13:01:09 +0000 (13:01 +0000)
committerAlfie Richards <alfie.richards@arm.com>
Wed, 7 Jan 2026 11:51:07 +0000 (11:51 +0000)
commit3ecc4d571f76d22cb08333c1cfe147674fd8c2cc
tree6f09d0a4cafc925bc6e3a750f698c873f5ff4c1b
parentcfc746c2118a09886fa61d076aba34436b967a08
targethooks: Change SAME_FUNCTION_VERSIONS hook to support checking mergeability

This changes the hook to support checking version mergeability for cases
where the version strings do imply the same version, but are conflicting
in some other way so cannot be merged.

This is a change required for adding priority version support in aarch64.

gcc/ChangeLog:

* target.def (TARGET_OPTION_SAME_FUNCTION_VERSIONS): Update
documentation.
* tree.cc (disjoint_version_decls): Change for new NULL parameter
to same_function_versions.
(diagnose_versioned_decls): Update to pass diagnostic location to
same_function_versions.
* doc/tm.texi: Regenerate.
* config/aarch64/aarch64.cc (aarch64_same_function_versions):
Update hook impl for new arguments.
* config/riscv/riscv.cc (riscv_same_function_versions): Update
hook impl for new arguments.
* config/loongarch/loongarch.cc
(loongarch_same_function_versions): Likewise
* hooks.cc (hook_stringslice_stringslice_unreachable): Changed
to...
(hook_stringslice_consttree_stringslice_consttree_unreachable):
...this and add extra arguments.
* hooks.h (hook_stringslice_stringslice_unreachable): Changed
to...
(hook_stringslice_consttree_stringslice_consttree_unreachable):
and add extra arguments.
gcc/config/aarch64/aarch64.cc
gcc/config/loongarch/loongarch.cc
gcc/config/riscv/riscv.cc
gcc/doc/tm.texi
gcc/hooks.cc
gcc/hooks.h
gcc/target.def
gcc/tree.cc