[PATCH] D51618: [dsymutil] Reduce peak memory usage for the single threaded execution.

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 6 01:08:15 PDT 2018


JDevlieghere marked 2 inline comments as done.
JDevlieghere added inline comments.


================
Comment at: llvm/tools/dsymutil/DwarfLinker.cpp:2622-2625
+    for (unsigned i = 0, e = NumObjects; i != e; ++i) {
+      AnalyzeLambda(i);
+      CloneLambda(i);
+    }
----------------
friss wrote:
> JDevlieghere wrote:
> > friss wrote:
> > > This loop doesn't have the LinkContext.Objectfile check which was in CloneLambda before and is in CloneAll. Would it be cleaner to pass a LinkContext to the lambdas and leave the logic there?
> > That check was moved into the `AnalyzeLambda` so it still happens, unless you're talking about something else?
> Previously CloneLambda would return early if LinkContext.Objectfile was null. Now, in the single threaded case, it will process the object file. I'm not sure something bad can happen, but it's a logic change.
Aha, I see, I moved it for `analyzeLambda` but not for the `cloneLambda`. Good catch, this would've segfaulted!


https://reviews.llvm.org/D51618





More information about the llvm-commits mailing list