llvm-6502/lib/Transforms
Nico Weber 3a5b1043d0 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
2014-05-02 18:35:25 +00:00
..
Hello [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
InstCombine Also handle ConstantAggregateZero when optimizing vpermilvar*. 2014-04-29 22:20:40 +00:00
Instrumentation [C++] Use 'nullptr'. 2014-04-28 04:05:08 +00:00
IPO Teach GlobalDCE how to remove empty global_ctor entries. 2014-05-02 18:35:25 +00:00
ObjCARC [C++] Use 'nullptr'. 2014-04-28 04:05:08 +00:00
Scalar [GVN] Pass the phi-translated address of a load instead of the untranslated 2014-05-02 17:59:17 +00:00
Utils Teach GlobalDCE how to remove empty global_ctor entries. 2014-05-02 18:35:25 +00:00
Vectorize Revert r205965, which essentially reverts r205018 for the second time. 2014-05-01 11:24:11 +00:00
CMakeLists.txt Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00
LLVMBuild.txt Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00
Makefile Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00