hanchenye-llvm-project/llvm/lib
Teresa Johnson d3a33a16bb Resubmit "Add new EliminateAvailableExternally module pass" (r239480)
This change includes a fix for https://code.google.com/p/chromium/issues/detail?id=499508#c3,
which required updating the visibility for symbols with eliminated definitions.

--Original Commit Message--

Add new EliminateAvailableExternally module pass, which is performed in
O2 compiles just before GlobalDCE, unless we are preparing for LTO.

This pass eliminates available externally globals (turning them into
declarations), regardless of whether they are dead/unreferenced, since
we are guaranteed to have a copy available elsewhere at link time.
This enables additional opportunities for GlobalDCE.

If we are preparing for LTO (e.g. a -flto -c compile), the pass is not
included as we want to preserve available externally functions for possible
link time inlining. The FE indicates whether we are doing an -flto compile
via the new PrepareForLTO flag on the PassManagerBuilder.

llvm-svn: 241466
2015-07-06 16:22:42 +00:00
..
Analysis IR: Do not consider available_externally linkage to be linker-weak. 2015-07-05 20:52:35 +00:00
AsmParser Add a DIModule metadata node to the IR. 2015-06-29 23:03:47 +00:00
Bitcode Remove always-true comparison, NFC. 2015-07-03 20:12:01 +00:00
CodeGen use range-based for loops; NFCI 2015-07-06 16:19:14 +00:00
DebugInfo Return ErrorOr from getSymbolAddress. 2015-07-03 18:19:00 +00:00
ExecutionEngine Remove getRelocationAddress. 2015-07-06 14:55:37 +00:00
Fuzzer [lib/Fuzzer] make assertions more informative and update comments for the user-supplied mutator 2015-05-30 17:33:13 +00:00
IR Use an early exit in DIBuilder::finalize() to improve readability. 2015-07-06 16:22:12 +00:00
IRReader Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC. 2015-06-16 22:27:55 +00:00
LTO LTO: expose LTO_SYMBOL_ALIAS, which indicates that the symbol is an alias. 2015-07-04 03:42:35 +00:00
LibDriver Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MC Fix spelling, NFC. 2015-07-04 05:48:52 +00:00
Object Remove getRelocationAddress. 2015-07-06 14:55:37 +00:00
Option [Option] Plug a leak when move-assigning an InputArgList. 2015-06-23 15:28:10 +00:00
Passes [PM] Fixup for r231556 where I missed a dependency on intrinsics 2015-03-07 09:08:20 +00:00
ProfileData Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Support [Support] Lazy load of dbghlp.dll on Windows 2015-07-02 14:34:57 +00:00
TableGen [TableGen] Change a couple methods to return an ArrayRef instead of a const std::vector reference. NFC 2015-07-06 06:23:01 +00:00
Target AMDGPU/SI: Add debugging subtarget feature for DS offsets 2015-07-06 16:01:58 +00:00
Transforms Resubmit "Add new EliminateAvailableExternally module pass" (r239480) 2015-07-06 16:22:42 +00:00
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
LLVMBuild.txt Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
Makefile LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00