[PATCH] D86905: Flush bitcode incrementally for LTO output
stephan.yichao.zhao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 12 13:34:33 PDT 2020
stephan.yichao.zhao marked 3 inline comments as done.
stephan.yichao.zhao added inline comments.
================
Comment at: lld/ELF/LTO.cpp:169
+ openLTOOutputFile(config->outputFile))
+ WriteBitcodeToFile(m, *os, false, nullptr, false, nullptr,
+ config->emitLLVMFlushThreshold);
----------------
tejohnson wrote:
> Nit, document constant parameters with /*parameter_name=*/
reverted the change at lld options.
================
Comment at: llvm/include/llvm/Bitstream/BitstreamWriter.h:96
+ void FlushToFile() {
+ constexpr uint64_t FlushThreshold = 1UL << 29; // 512M
+ if (!FS) {
----------------
tejohnson wrote:
> stephan.yichao.zhao wrote:
> > tejohnson wrote:
> > > Would it be valuable to make this configurable? How sensitive is performance to the value chosen here?
> > Added a flag to plugin-opt. Is it the right way to do this?
> Oh sorry, I just meant an llvm internal option (cl::opt<int>) in this file. Will let @MaskRay comment on whether they want it as an lld option.
Switched to cl::opt. Thank you for the suggestion, I did not know this option.
What is the proper way to call the options with clang or lld? For example, I tried clang/ld.lld with --bitcode-mdindex-threshold=1 or -bitcode-mdindex-threshold=1. They are not accepted. Do we need any prefix before them?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86905/new/
https://reviews.llvm.org/D86905
More information about the llvm-commits
mailing list