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

Frederic Riss via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 5 14:33:28 PDT 2018


friss 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);
+    }
----------------
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.


https://reviews.llvm.org/D51618





More information about the llvm-commits mailing list