Implement the isSafeToDiscardIfUnused predicate and use it in globalopt and
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 14 Jun 2012 22:48:13 +0000 (22:48 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 14 Jun 2012 22:48:13 +0000 (22:48 +0000)
commit0397729d3b8da4208660a163d18296b1a3bd32b8
tree06128ec39f9c9771e28692b44a8ceb8edb41e338
parent312091ece3e7860cea0410318cf1e06cea75954e
Implement the isSafeToDiscardIfUnused predicate and use it in globalopt and
globaldce. Globaldce was already removing linkonce globals, but globalopt was
not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158476 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/GlobalValue.h
lib/Transforms/IPO/GlobalDCE.cpp
lib/Transforms/IPO/GlobalOpt.cpp
test/Transforms/GlobalOpt/deadglobal.ll