[PATCH] D51618: [dsymutil] Reduce peak memory usage for the single threaded execution.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 08:52:14 PDT 2018
aprantl added a comment.
It would be good to document in the man page that -j >1 uses more memory.
================
Comment at: llvm/tools/dsymutil/DwarfLinker.cpp:2486
- // Now do analyzeContextInfo in parallel as it is particularly expensive.
- auto AnalyzeLambda = [&]() {
- for (unsigned i = 0, e = NumObjects; i != e; ++i) {
- auto &LinkContext = ObjectContexts[i];
+ // Analyzing the context info is particularly expensive so this is a chunk
+ // of work we want to parallelize.
----------------
... so it is being run in parallel with emitting the previous compile unit.
================
Comment at: llvm/tools/dsymutil/DwarfLinker.cpp:2618
+
+ // To limit memory consumption in the single threaded case we always analyze
+ // and clone together, so we can clear the LinkContext before moving on.
----------------
`... analyze and clone are run sequentially, so the LinkContext may be freed.`
where is this actually happening?
Repository:
rL LLVM
https://reviews.llvm.org/D51618
More information about the llvm-commits
mailing list