llvm-6502/lib
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
..
Analysis [LCG] Add the other simple edge insertion API to the call graph. This 2014-05-01 12:18:20 +00:00
AsmParser Add 'musttail' marker to call instructions 2014-04-24 20:14:34 +00:00
Bitcode [IR] Make {extract,insert}element accept an index of any integer type. 2014-05-01 22:12:39 +00:00
CodeGen DAGCombine: prevent formation of illegal ConstantFP nodes. 2014-05-02 17:25:02 +00:00
DebugInfo [DWARF parser] Cleanup code in DWARFDebugLine. 2014-04-30 00:09:19 +00:00
ExecutionEngine [ARM64] Try and make the ELF MCJIT *slightly* less broken for ARM64. 2014-04-30 10:15:41 +00:00
IR [IR] Make {extract,insert}element accept an index of any integer type. 2014-05-01 22:12:39 +00:00
IRReader [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 06:32:26 +00:00
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 06:32:26 +00:00
LTO Add an -mattr option to the gold plugin to support subtarget features in LTO 2014-04-25 21:46:51 +00:00
MC MC: place .file records into the correct section 2014-05-02 17:45:24 +00:00
Object ELFObjectWriter: deduplicate suffices in strtab 2014-04-30 16:25:02 +00:00
Option Protect the ArgList dtor 2014-04-20 23:59:00 +00:00
ProfileData Fixing a cast-qual warning. getBufferStart() and getBufferEnd() both return a const char *, so casting to non-const was triggering a warning (even though the assignment and usage was always const anyway). 2014-05-01 17:16:24 +00:00
Support Add a description for AMD's bdver4 (aka Excavator). 2014-05-02 15:47:07 +00:00
TableGen raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
Target Add a description for AMD's bdver4 (aka Excavator). 2014-05-02 15:47:07 +00:00
Transforms Teach GlobalDCE how to remove empty global_ctor entries. 2014-05-02 18:35:25 +00:00
CMakeLists.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
LLVMBuild.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
Makefile ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00