[PATCH] D49882: [InstrProf] Use comdats on COFF for available_externally functions

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 26 15:38:34 PDT 2018


rnk created this revision.
rnk added reviewers: davidxl, xur.
Herald added subscribers: aheejin, hiraditya.

r262157 added ELF-specific logic to put a comdat on the __profc_*
globals created for available_externally functions. We should be able to
generalize that logic to all object file formats that support comdats,
i.e. everything other than MachO. This fixes duplicate symbol errors,
since on COFF, linkonce_odr doesn't make the symbol weak.

Fixes PR38251.


https://reviews.llvm.org/D49882

Files:
  llvm/lib/ProfileData/InstrProf.cpp
  llvm/test/Instrumentation/InstrProfiling/linkage.ll
  llvm/test/Transforms/PGOProfile/comdat_rename.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49882.157596.patch
Type: text/x-patch
Size: 5313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180726/ea67f942/attachment.bin>


More information about the llvm-commits mailing list