1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/test/Transforms/GlobalDCE
Nico Weber fdced47a40 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.

llvm-svn: 207856
2014-05-02 18:35:25 +00:00
..
2002-07-17-CastRef.ll
2002-07-17-ConstantRef.ll
2002-08-17-FunctionDGE.ll
2002-08-17-WorkListTest.ll
2002-09-12-Redeletion.ll
2003-07-01-SelfReference.ll
2003-10-09-PreserveWeakGlobals.ll
2009-01-05-DeadAliases.ll
2009-02-17-AliasUsesAliasee.ll
basicvariabletest.ll
complex-constantexpr.ll Revert 179826. Tests were worthless. 2013-04-19 09:32:30 +00:00
externally_available.ll
global_ctors_integration.ll Teach GlobalDCE how to remove empty global_ctor entries. 2014-05-02 18:35:25 +00:00
global_ctors.ll Teach GlobalDCE how to remove empty global_ctor entries. 2014-05-02 18:35:25 +00:00
indirectbr.ll GlobalDCE: Fix an oversight in my last commit that could lead to crashes. 2013-04-13 16:11:14 +00:00