Move -fno-semantic-interposition dso_local logic from TargetMachine to Clang CodeGenM...
authorFangrui Song <i@maskray.me>
Wed, 30 Dec 2020 07:37:55 +0000 (23:37 -0800)
committerFangrui Song <i@maskray.me>
Wed, 30 Dec 2020 07:37:55 +0000 (23:37 -0800)
commit2820a2ca3a0e69c3f301845420e0067ffff2251b
tree8b64848e1d29f8bcc27054738be2417d1f7ee020
parent30feb93036ebb8ffc5233a9ab3960836c2407d95
Move -fno-semantic-interposition dso_local logic from TargetMachine to Clang CodeGenModule

This simplifies TargetMachine::shouldAssumeDSOLocal and and gives frontend the
decision to use dso_local. For LLVM synthesized functions/globals, they may lose
inferred dso_local but such optimizations are probably not very useful.

Note: the hasComdat() condition in canBenefitFromLocalAlias (D77429) may be dead now.
(llvm/CodeGen/X86/semantic-interposition-comdat.ll)
(Investigate whether we need test coverage when Fuchsia C++ ABI is clearer)
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/CodeGen/semantic-interposition-no.c [new file with mode: 0644]
llvm/lib/Target/TargetMachine.cpp
llvm/test/CodeGen/X86/semantic-interposition-comdat.ll [deleted file]
llvm/test/CodeGen/X86/semantic-interposition-infer-dsolocal.ll [deleted file]