[PATCH] D146328: [clang][deps] Only cache files with specific extension
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 17 13:19:32 PDT 2023
jansvoboda11 created this revision.
jansvoboda11 added reviewers: Bigcheese, benlangmuir.
Herald added a subscriber: ributzka.
Herald added a project: All.
jansvoboda11 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
In the scanner's VFS, we cache all files by default and only avoid caching stat failures for certain files. This tanks the performance of scanning with pre-populated module cache. When there is a stale PCM file, it gets cached by the scanner at the start and the rebuilt version never makes it through the VFS again. The TU invocation that rebuilds the PCM only sees the copy in its InMemoryModuleCache, which is invisible to other invocations. This means the PCM gets rebuilt for every TU given to the scanner.
This patch fixes the situation by flipping the default, only caching files that are known to be important, and letting everything else fall through to the underlying VFS.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146328
Files:
clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h
clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146328.506188.patch
Type: text/x-patch
Size: 8700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230317/db5f6502/attachment.bin>
More information about the cfe-commits
mailing list