[PATCH] D135590: [ThinLTO][ELF] Add a ThinLTO warning if cache_size_bytes or cache_size_files is too small for the current link job.

Ying Yi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 10 08:18:23 PDT 2022


MaggieYi created this revision.
MaggieYi added reviewers: pcc, tejohnson, MaskRay, edd, kbelochapka, wristow, russell.gallop.
Herald added subscribers: ormris, StephenFan, steven_wu, hiraditya, arichardson, inglorion, emaste.
Herald added a project: All.
MaggieYi requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

In this patch, a ThinLTO warning is added if cache_size_bytes or cache_size_files is too small for the current link job. The warning recommends the user to consider adjusting --thinlto-cache-policy.

A specific case for ThinLTO cache pruning is that the current build is huge, and the cache wasn't big enough to hold the intermediate object files of that build. So in doing that build, a file would be cached, and later in that same build it would be evicted. This was significantly decreasing the effectiveness of the cache. By giving this warning, the user could identify the required cache size/files and improve ThinLTO link speed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135590

Files:
  lld/ELF/LTO.cpp
  lld/test/ELF/lto/cache-warnings.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135590.466508.patch
Type: text/x-patch
Size: 5283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221010/ec587bc4/attachment.bin>


More information about the llvm-commits mailing list