[PATCH] D28737: [ThinLTO] Don't create a comdat group for a dropped def with initializer

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 14 18:04:18 PST 2017


tejohnson created this revision.
tejohnson added a reviewer: mehdi_amini.
tejohnson added a subscriber: llvm-commits.

Non-prevailing weak/linkonce odr symbols will be dropped to
available_externally when possible. If they had an initializer in the
global_ctors list, a comdat group was being created. This code
already had logic to skip available_externally defs, but now the
EliminateAvailableExternally pass will drop these symbols to
declarations earlier. Change the check to skip all declarations for
linker (which includes available_externally along with declarations).


https://reviews.llvm.org/D28737

Files:
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  test/tools/gold/X86/Inputs/thinlto_linkonce_comdat1.ll
  test/tools/gold/X86/Inputs/thinlto_linkonce_comdat2.ll
  test/tools/gold/X86/thinlto_linkonce_comdat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28737.84469.patch
Type: text/x-patch
Size: 4995 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170115/d1620588/attachment-0001.bin>


More information about the llvm-commits mailing list