aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-09-06 17:31:59 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-09-06 17:31:59 +0000
commit5e322f51259902bdd78c4cec2308fe0b3f41dbef (patch)
tree48685e775ebda275fa847537fc6bd5791ada7deb /clang/lib/CodeGen/CodeGenModule.cpp
parentdf84dc6979fae8d8a9a3ea89d7cc2c83a5d9313d (diff)
downloadllvm-5e322f51259902bdd78c4cec2308fe0b3f41dbef.zip
llvm-5e322f51259902bdd78c4cec2308fe0b3f41dbef.tar.gz
llvm-5e322f51259902bdd78c4cec2308fe0b3f41dbef.tar.bz2
[dsymutil] Reduce peak memory usage for the single threaded execution.
Keeping the compile units in memory is expensive. For the single threaded case we allocate them in the analyze part and deallocate them again once we've finished cloning. This poses a problem in the single threaded case where we did all the analysis first followed by all the cloning. This meant we had all the link context in memory right after analyzing finished. This patch changes the way we order work in the single threaded case. Instead of doing all the analysis and cloning in serial, we now interleave the two so we can deallocate the memory as soon as a file is processed. The result is binary identical and peak memory usage went down from 13.43GB to 5.73GB for a debug build of trunk clang. Differential revision: https://reviews.llvm.org/D51618 llvm-svn: 341568
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions