[PATCH] D113153: [lld-macho] Cache readFile results
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 3 21:25:51 PDT 2021
int3 accepted this revision.
int3 added a comment.
This revision is now accepted and ready to land.
> I could see this being an issue with OOMs
We are pretty liberal with our memory use at the moment. E.g. we basically don't free anything until process exit, with the view that most of things we allocate live for most of the linker process' short lifetime anyway. I think we can run with this and revisit if it causes any problems in practice.
================
Comment at: lld/MachO/InputFiles.cpp:176
+static DenseMap<CachedHashStringRef, MemoryBufferRef> resolvedReads;
// Open a given file path and return it as a memory-mapped file.
----------------
Would be nice to have a comment here about how this is primarily for the caching of `.tbd` / common library files and is a bit of a heavy hammer (as mentioned in the commit message)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113153/new/
https://reviews.llvm.org/D113153
More information about the llvm-commits
mailing list