diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-04-28 19:30:41 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-04-28 19:30:41 +0000 |
commit | 156f4ee1c0b18f9a2d2ffe21aaccf857758a2184 (patch) | |
tree | 37632fc4cd562c8da450bea80ff286114b93369a /lldb/packages/Python/lldbsuite/test/expression_command | |
parent | 3189622ae55f66e57a7288b7523abce2e3ef39b3 (diff) | |
download | bcm5719-llvm-156f4ee1c0b18f9a2d2ffe21aaccf857758a2184.tar.gz bcm5719-llvm-156f4ee1c0b18f9a2d2ffe21aaccf857758a2184.zip |
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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command')
0 files changed, 0 insertions, 0 deletions