[PATCH] D135427: [ThinLTO] Make local linkage GlobalValue in non-prevailing comdat available_externally

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 12:43:58 PDT 2022


xur added a comment.

In D135427#3842972 <https://reviews.llvm.org/D135427#3842972>, @tejohnson wrote:

>> Regular LTO is not fixed yet.
>
> Looks like handleNonPrevailingComdat in LTO.cpp would need a similar fix.
>
>> When FuncImport.cpp ...
>
> Note that while this functionality currently lives in FunctionImport.cpp it isn't really related to function importing, rather to ThinLTO symbol resolution. So mentioning the file name might be a little misleading (but if you do, correct it to FunctionImport.cpp).
>
> @xur can you confirm this fixes the original problem?

Yes. This fix also works. This basically retains the COMDAT group for the profile variables in LTO builds -- the same as non-LTO builds.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135427/new/

https://reviews.llvm.org/D135427



More information about the llvm-commits mailing list