summaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader/BitcodeReader.h
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-05-02 18:35:25 +0000
committerNico Weber <nicolasweber@gmx.de>2014-05-02 18:35:25 +0000
commit3a5b1043d0f672703381a0c5136c49486a619f91 (patch)
tree6844d802ed30f03c5c0d93ebb99713a844a479db /lib/Bitcode/Reader/BitcodeReader.h
parentd753e830cda1b1604a6527f81f76709039999fc4 (diff)
downloadllvm-3a5b1043d0f672703381a0c5136c49486a619f91.tar.gz
llvm-3a5b1043d0f672703381a0c5136c49486a619f91.tar.bz2
llvm-3a5b1043d0f672703381a0c5136c49486a619f91.tar.xz
Teach GlobalDCE how to remove empty global_ctor entries.
This moves most of GlobalOpt's constructor optimization code out of GlobalOpt into Transforms/Utils/CDtorUtils.{h,cpp}. The public interface is a single function OptimizeGlobalCtorsList() that takes a predicate returning which constructors to remove. GlobalOpt calls this with a function that statically evaluates all constructors, just like it did before. This part of the change is behavior-preserving. Also add a call to this from GlobalDCE with a filter that removes global constructors that contain a "ret" instruction and nothing else – this fixes PR19590. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207856 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.h')
0 files changed, 0 insertions, 0 deletions