[llvm] [ThinLTO] Simplify checking for single external copy (NFCI) (PR #164861)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 23 12:56:47 PDT 2025
https://github.com/mingmingl-llvm approved this pull request.
LGTM since compiler won't internalize more by reading the diff itself.
If I understand correctly, the surrounding comment explains why `ExternallyVisibleCopies` before and `SingleExternallyVisibleCopy` are equivalent, and this change won't cause compiler to internalize less.
* _case 2 will only happen if there is exactly one definition of the value (i.e. in exactly one module), as duplicate defs are result in the value being marked exported._
* _Therefore, only internalize linkonce/weak if there is a single copy, that is prevailing in this IR module._
https://github.com/llvm/llvm-project/pull/164861
More information about the llvm-commits
mailing list