Optimize linkonce_odr unnamed_addr functions during LTO.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 3 Oct 2013 18:29:09 +0000 (18:29 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 3 Oct 2013 18:29:09 +0000 (18:29 +0000)
commit438900938c3ac9d7fac2dd5d2c85ca4b9b2e35f7
treeee292d94cfa7c8661cc4cd598f32e66289df9aeb
parent1df59ef1aa271a4e33cf8973e14bcaf55c585231
Optimize linkonce_odr unnamed_addr functions during LTO.

Generalize the API so we can distinguish symbols that are needed just for a DSO
symbol table from those that are used from some native .o.

The symbols that are only wanted for the dso symbol table can be dropped if
llvm can prove every other dso has a copy (linkonce_odr) and the address is not
important (unnamed_addr).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191922 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/llvm-c/lto.h
include/llvm/LTO/LTOCodeGenerator.h
include/llvm/Transforms/IPO.h
lib/LTO/LTOCodeGenerator.cpp
lib/Transforms/IPO/IPO.cpp
lib/Transforms/IPO/Internalize.cpp
lib/Transforms/IPO/PassManagerBuilder.cpp
test/LTO/cfi_endproc.ll
test/Transforms/Internalize/lists.ll
tools/gold/gold-plugin.cpp
tools/llvm-lto/llvm-lto.cpp
tools/lto/lto.cpp