Go to file
Rafael Espindola 156f4ee1c0 Use a single context for lto.
Using multiple context used to be a really big memory saving because we
could free memory from each file while the linker proceeded with the
symbol resolution. We are getting lazier about reading data from the
bitcode, so I was curious if this was still a good tradeoff.

One thing that is a bit annoying is that we still have to copy the
symbol names. The problem is that the names are stored in the Module and
get freed when we move the module bits during linking.

Long term I think the solution is to add a symbol table to the bitcode.
That way IRObject file will not need to use a Module or a Context and we
can drop it while still keeping a StringRef to the names.

This patch is still be an interesting medium term improvement.

When linking llvm-as without debug info this patch is a small speedup:

master: 29.861877513 seconds
patch: 29.814533787 seconds

With debug info the numbers are

master: 34.765181469 seconds
patch: 34.563351584 seconds

The peak memory usage when linking llvm-as with debug info was

master: 599.10MB
patch: 600.13MB
llvm-svn: 267921
2016-04-28 19:30:41 +00:00
clang Fix use of uninitialized value exposed by r267802. Accessors of an invalid 2016-04-28 18:26:32 +00:00
clang-tools-extra [include-fixer] Add an option to minimize include paths. 2016-04-28 11:21:29 +00:00
compiler-rt [CMake] Updating Apple CMake cache file 2016-04-28 18:24:29 +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 prepare-builtins: Remove call to getGlobalContext() 2016-04-15 14:18:58 +00:00
libcxx Remove names of unreferenced parameters. Patch from STL@microsoft.com 2016-04-28 03:17:56 +00:00
libcxxabi Enable testing for static libc++abi 2016-04-19 12:47:38 +00:00
libunwind unwind: remove last instance of -Wexpansion-to-defined 2016-04-26 01:11:29 +00:00
lld Use a single context for lto. 2016-04-28 19:30:41 +00:00
lldb Provide location information (file name, line number) in TSan reports about global variables. 2016-04-28 15:27:10 +00:00
llgo [llgo] llgoi: separate evaluation from printing 2016-04-25 01:18:20 +00:00
llvm Remove doInitialization() and doFinalization() member declarations without definitions. 2016-04-28 19:21:30 +00:00
openmp Remove architecture dependent Hwloc DEBUG section 2016-04-25 21:11:26 +00:00
polly [FIX] Correct assumption simplification 2016-04-28 14:32:58 +00:00