llvm-project/llvm/lib
Eli Friedman cd07a3e2f9 Place undefined globals in .bss instead of .data
Following up on the discussion from
http://lists.llvm.org/pipermail/llvm-dev/2017-April/112305.html, undef
values are now placed in the .bss as well as null values. This prevents
undef global values taking up potentially huge amounts of space in the
.data section.

The following two lines now both generate equivalent .bss data:

@vals1 = internal unnamed_addr global [20000000 x i32] zeroinitializer, align 4
@vals2 = internal unnamed_addr global [20000000 x i32] undef, align 4 ; previously unaccounted for

This is primarily motivated by the corresponding issue in the Rust
compiler (https://github.com/rust-lang/rust/issues/41315).

Differential Revision: https://reviews.llvm.org/D41705

Patch by varkor!

llvm-svn: 324424
2018-02-06 23:22:14 +00:00
..
Analysis [InstCombine][ValueTracking] Match non-uniform constant power-of-two vectors 2018-02-06 18:39:23 +00:00
AsmParser LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
BinaryFormat [Support] Move DJB hash to support. NFC 2018-01-28 11:05:10 +00:00
Bitcode Re-land "[ThinLTO] Add call edges' relative block frequency to per-module summary." 2018-01-25 19:27:17 +00:00
CodeGen [LivePhysRegs] Fix handling of return instructions. 2018-02-06 23:00:17 +00:00
DebugInfo [DWARF] Regularize dumping strings from line tables. 2018-02-05 20:43:15 +00:00
Demangle Silence a bunch of implicit fallthrough warnings 2017-12-19 22:05:25 +00:00
ExecutionEngine [ORC] Use explicit constructor calls to fix a builder error at 2018-02-06 22:17:09 +00:00
FuzzMutate [llvm-opt-fuzzer] Avoid adding incorrect inputs to the fuzzer corpus 2018-02-05 11:05:47 +00:00
Fuzzer [libFuzzer] Delete llvm/lib/Fuzzer 2017-10-16 20:48:19 +00:00
IR LTO: Include dso-local bit in ThinLTO cache key. 2018-02-05 17:17:51 +00:00
IRReader LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
LTO [ThinLTO] Remove dead and dropped symbol declarations when possible 2018-02-06 00:43:39 +00:00
LineEditor
Linker [IRMover] Add comment and fix test case 2018-01-25 08:35:52 +00:00
MC [DWARFv5] Emit .debug_line_str (in a non-DWO file). 2018-02-06 20:29:21 +00:00
Object [RISCV] Add ELFObjectFileBase::getRISCVFeatures let llvm-objdump could get RISCV target feature 2018-02-02 06:01:02 +00:00
ObjectYAML CodeGen: support an extension to pass linker options on ELF 2018-01-30 16:29:29 +00:00
Option [Option] For typo '-foo', suggest '--foo' 2018-01-09 19:38:04 +00:00
Passes Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
ProfileData Remove superfluous copies in sample profiling. 2017-12-28 18:10:41 +00:00
Support [ADT] Replace sys::MemoryFence with standard atomics. 2018-02-01 20:28:33 +00:00
TableGen [TblGen] Inline an (almost) trivial accessor. No functionality change. 2018-01-23 23:03:50 +00:00
Target Place undefined globals in .bss instead of .data 2018-02-06 23:22:14 +00:00
Testing Force #define GTEST_LANG_CXX11. 2017-10-27 21:12:28 +00:00
ToolDrivers [COFF] Keep the underscore on exported decorated stdcall functions in MSVC mode 2018-01-20 11:44:32 +00:00
Transforms [DSE] Upgrade uses of MemoryIntrinic::getAlignment() to new API. (NFC) 2018-02-06 21:18:33 +00:00
WindowsManifest Fix bug 34608 by moving private header out of public header. 2017-09-14 23:01:13 +00:00
XRay [XRay] clarify error messages when parsing broken traces 2018-01-30 13:41:34 +00:00
CMakeLists.txt Moving libFuzzer from LLVM to compiler-rt. 2017-08-21 23:25:12 +00:00
LLVMBuild.txt Re-apply "Introduce FuzzMutate library" 2017-08-21 22:57:06 +00:00