[all-commits] [llvm/llvm-project] 651b2f: [CodeGen] Function multi-versioning: don't set com...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Wed Aug 30 09:47:02 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 651b2fbc1c7ec4992d2c80b8456c5c5a72394caf
https://github.com/llvm/llvm-project/commit/651b2fbc1c7ec4992d2c80b8456c5c5a72394caf
Author: Fangrui Song <i at maskray.me>
Date: 2023-08-30 (Wed, 30 Aug 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/test/CodeGen/attr-target-clones.c
M clang/test/CodeGen/attr-target-mv.c
Log Message:
-----------
[CodeGen] Function multi-versioning: don't set comdat for internal linkage resolvers
For function multi-versioning using the target or target_clones
function attributes, currently we incorrectly set comdat for internal
linkage resolvers. This is problematic for ELF linkers
as GRP_COMDAT deduplication will kick in even with STB_LOCAL signature
(https://groups.google.com/g/generic-abi/c/2X6mR-s2zoc
"GRP_COMDAT group with STB_LOCAL signature").
In short, two `__attribute((target_clones(...))) static void foo()`
in two translation units will be deduplicated. Fix this.
Fix #65114
Reviewed By: erichkeane
Differential Revision: https://reviews.llvm.org/D158963
More information about the All-commits
mailing list