[PATCH] D23836: [ThinLTO/gold] Add caching support to gold-plugin
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 24 10:40:10 PDT 2016
mehdi_amini added inline comments.
================
Comment at: llvm/trunk/tools/gold/gold-plugin.cpp:812
@@ -801,1 +811,3 @@
+ *LTOOutput(OutputName).getStream() << Buffer->getBuffer();
+ });
};
----------------
mehdi_amini wrote:
> I just noticed: this is largely suboptimal, the Buffer will be a mmap'd file in memory, and you're duplicating it here.
I didn't notice earlier because the libLTO interface returns a pointer to the memory to the linker, so the MemoryBuffer is untouched till the linker needs it (it does not need to be paged in memory, which can contributes to explains why you have much more memory pressure)
Repository:
rL LLVM
https://reviews.llvm.org/D23836
More information about the llvm-commits
mailing list