[PATCH] D42816: [ThinLTO] Remove dead and dropped symbol declarations when possible

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 14:14:30 PST 2018


tejohnson created this revision.
tejohnson added reviewers: grimar, davidxl.
Herald added subscribers: eraman, inglorion, mehdi_amini.

Removing the dropped symbols will prevent indirect call promotion in the
ThinLTO Backend from adding a new reference to a symbol, which can
result in linker unsats. This can happen when we compile with a sample
profile collected from one binary by used for another, which may have
profiled targets that aren't used in the new binary.

Note that until dropDeadSymbols handles variables and aliases (in
progress), we may not be able to remove the declaration and can still
have an issue.


Repository:
  rL LLVM

https://reviews.llvm.org/D42816

Files:
  lib/LTO/LTOBackend.cpp
  test/ThinLTO/X86/deadstrip.ll
  test/Transforms/PGOProfile/thinlto_samplepgo_icp_droppeddead.ll
  test/tools/gold/X86/global_with_section.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42816.132472.patch
Type: text/x-patch
Size: 5734 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180201/d3f0c6a3/attachment.bin>


More information about the llvm-commits mailing list