[PATCH] D18122: Rework linkInModule(), making it oblivious to ThinLTO

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 12 14:47:31 PST 2016


joker.eph created this revision.
joker.eph added a reviewer: tejohnson.
joker.eph added a subscriber: llvm-commits.
Herald added a subscriber: joker.eph.

ThinLTO is relying on linkInModule to import selected function.
However a lot of "magic" was hidden in linkInModule and the IRMover,
who would rename and promote global variables on the fly.

This is moving to an approach where the steps are decoupled and the
client is reponsible to specify the list of globals to import.
As a consequence some test are changed because they were relying on
the previous behavior which was importing the definition of *every*
single global without control on the client side.
Now the burden is on the client to decide if a global has to be imported
or not.

http://reviews.llvm.org/D18122

Files:
  include/llvm/Linker/Linker.h
  include/llvm/Transforms/Utils/FunctionImportUtils.h
  lib/Linker/LinkModules.cpp
  lib/Transforms/IPO/FunctionImport.cpp
  lib/Transforms/Utils/FunctionImportUtils.cpp
  test/Linker/funcimport.ll
  test/Transforms/FunctionImport/Inputs/funcimport.ll
  test/Transforms/FunctionImport/funcimport.ll
  tools/llvm-link/llvm-link.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18122.50528.patch
Type: text/x-patch
Size: 19049 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160312/70ad59e3/attachment.bin>


More information about the llvm-commits mailing list