Optimize more linkonce_odr values during LTO.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 21 Oct 2013 17:14:55 +0000 (17:14 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 21 Oct 2013 17:14:55 +0000 (17:14 +0000)
commit713cab059ebb67c2f51d8da9d8e57be2b1dcd9c2
treec92ff5eac147f406e87b6e2cb43543d6e5b37f11
parentda39dd30ad3c969be3ac843307d4630807699538
Optimize more linkonce_odr values during LTO.

When a linkonce_odr value that is on the dso list is not unnamed_addr
we can still look to see if anything is actually using its address. If
not, it is safe to hide it.

This patch implements that by moving GlobalStatus to Transforms/Utils
and using it in Internalize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193090 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/GlobalStatus.h [new file with mode: 0644]
lib/Transforms/IPO/GlobalOpt.cpp
lib/Transforms/IPO/Internalize.cpp
lib/Transforms/Utils/CMakeLists.txt
lib/Transforms/Utils/GlobalStatus.cpp [new file with mode: 0644]
test/LTO/cfi_endproc.ll
test/Transforms/Internalize/lists.ll