[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:37:43 PDT 2020


stephan.yichao.zhao marked an inline comment as done.
stephan.yichao.zhao added inline comments.


================
Comment at: llvm/include/llvm/Bitstream/BitstreamWriter.h:96
+  void FlushToFile() {
+    constexpr uint64_t FlushThreshold = 1UL << 29; // 512M
+    if (!FS) {
----------------
stephan.yichao.zhao wrote:
> 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?
Added cl::opt at BitcodeWriter.cpp instead of here. BitstreamWriter.h does not have cpp. If we add its cpp, we also need to add a library, and many code needs to update to use the new library like this (https://reviews.llvm.org/D63899). 


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