Go to file
David Blaikie 07963bd1d1 DebugInfo: Do not emit empty CUs
Consistent with GCC and addresses a shortcoming with ThinLTO where many
imported CUs may end up being empty (because the functions imported from
them either ended up not being used (and were then discarded, since
they're imported as available_externally) or optimized away entirely).

Test cases previously testing empty CUs (either intentionally, or
because they didn't need anything more complicated) had a trivial 'int'
or similar basic type added to their retained types list.

This is a first order approximation - a deeper implementation could do
things like:

1) Be more lazy about construction of the CU - for example if two CUs
containing a single identical retained type are linked together, with
this change one of the two CUs will be produced but empty (since a
duplicate type won't be produced).

2) Go further and invert all the CU links the same way the subprogram
link is inverted - keep named CU lists of retained types, macros, etc,
and have those link back to the CU. Then if they're emitted, the CU is
emitted, but never otherwise - this would allow the metadata itself to
be dropped earlier too, though it seems unlikely that's an important
optimization as there shouldn't be many CUs relative to the number of
other entities.

llvm-svn: 304020
2017-05-26 18:52:56 +00:00
clang CodeGen: Define Swift's legal vector types for AArch64, ARM 2017-05-26 18:11:54 +00:00
clang-tools-extra [clangd] Attempt to fix tests failing on Windows 2017-05-26 14:34:34 +00:00
compiler-rt [LSAN-ARM] Marking new test unsupported on ARMHF due to bot failures 2017-05-26 17:31:33 +00:00
debuginfo-tests Add a test for PR33166. 2017-05-25 19:33:16 +00:00
libclc math: Implement sinh function 2017-02-25 02:46:53 +00:00
libcxx Workaround debug info bug in Clangs coroutine implementation 2017-05-26 04:09:38 +00:00
libcxxabi [Demangler] Remove a failing assert introduced in r303718 2017-05-24 20:53:13 +00:00
libunwind [libunwind] Fix executable stack directive on Linux. 2017-05-16 20:18:57 +00:00
lld [ELF] - Attemp to fix bot 2017-05-26 18:07:25 +00:00
lldb Fixing Memory Leak 2017-05-26 14:26:14 +00:00
llgo benchcomp: Add a mode for analyzing file sizes. 2017-04-03 19:13:12 +00:00
llvm DebugInfo: Do not emit empty CUs 2017-05-26 18:52:56 +00:00
openmp Fix for KMP_AFFINITY=respect with multiple processor groups 2017-05-15 19:05:59 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [ScopInfo] Translate mapToDimension to isl C++ [NFC] 2017-05-26 17:22:03 +00:00