Go to file
Duncan P. N. Exon Smith 520f8542ff Bitcode: Try to emit metadata in function blocks
Whenever metadata is only referenced by a single function, emit the
metadata just in that function block.  This should improve lazy-loading
by reducing the amount of metadata in the global block.

For now, this should catch all DILocations, and anything else that
happens to be referenced only by a single function.

It's also a first step toward a couple of possible future directions
(which this commit does *not* implement):

 1. Some debug info metadata is only referenced from compile units and
    individual functions.  If we can drop the link from the compile
    unit, this optimization will get more powerful.

 2. Any uniqued metadata that isn't referenced globally can in theory be
    emitted in every function block that references it (trading off
    bitcode size and full-parse time vs. lazy-load time).

Note: this assumes the new BitcodeReader error checking from r265223.
The metadata stored in function blocks gets purged after parsing each
function, which means unresolved forward references will get lost.
Since all the global metadata should have already been resolved by the
time we get to the function metadata blocks we just need to check for
that case.  (If for some reason we need to handle bitcode that fails the
checks in r265223, the fix is to store about-to-be-dropped unresolved
nodes in MetadataList::shrinkTo until they can be handled succesfully by
a future call to MetadataList::tryToResolveCycles.)

llvm-svn: 265226
2016-04-02 15:22:57 +00:00
clang [test] Don't use "UNSUPPORTED" in FileCheck prefixes 2016-04-02 05:29:00 +00:00
clang-tools-extra [clang-tidy] Update an example. NFC. 2016-04-02 03:44:23 +00:00
compiler-rt Fix warnings uncovered by building with clang-cl 2016-04-01 17:09:12 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Update copyright year to 2016. 2016-03-30 22:39:03 +00:00
libcxx Fix LWG issue 2469 - Use piecewise construction in map::operator[]. 2016-03-31 03:13:37 +00:00
libcxxabi Update copyright year to 2016. 2016-03-30 22:40:47 +00:00
libunwind [AArch64] Fix libunwind build when using GNU assembler 2016-02-11 21:22:57 +00:00
lld Call cl::ParseCommandLineOptions from the driver. 2016-04-02 04:08:02 +00:00
lldb Add some unit tests for ClangASTContext. 2016-04-01 23:20:35 +00:00
llgo [llgo] add USES_TERMINAL option to check-libgo 2016-03-30 00:29:33 +00:00
llvm Bitcode: Try to emit metadata in function blocks 2016-04-02 15:22:57 +00:00
openmp Fix bug when KMP_USE_ADAPTIVE_LOCKS is 0 2016-03-30 21:50:59 +00:00
polly [FIX] Adjust the insert point for non-affine region PHIs 2016-04-01 11:25:47 +00:00