commit | a5bd54307b1adacb3df297b9b8010979b9afa4d7 | [log] [tgz] |
---|---|---|
author | Eli Friedman <efriedma@codeaurora.org> | Tue Feb 06 23:22:14 2018 +0000 |
committer | Eli Friedman <efriedma@codeaurora.org> | Tue Feb 06 23:22:14 2018 +0000 |
tree | 2b6697d53a1e07cc25e747455375a95efb7923d7 | |
parent | c1d66bad3334173c75a7c1beb570b38709d5b7ec [diff] |
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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324424 91177308-0d34-0410-b5e6-96231b3b80d8