[PATCH] D95628: WIP: clang-scan-deps: Skip the disk when scanning modules dependencies
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 28 08:48:45 PST 2021
dexonsmith created this revision.
dexonsmith added reviewers: Bigcheese, arphaman, sammccall.
Herald added subscribers: ributzka, tschuett.
dexonsmith requested review of this revision.
Herald added a project: clang.
Modules dependendency scanning builds lightweight modules (based on
minimized preprocess-only sources) in order to construct the module
dependency graph. Add `-intercept-module-outputs` (on-by-default), which
keeps these lightweight modules in memory instead of writing to and
reading from disk, leveraging llvm::vfs::OutputManager.
This patch uses a separate cache per worker, but these would ideally be
kept in a shared result cache (could be an in-memory CAS).
This is a WIP because it's based on the OutputManager RFC (see patches https://reviews.llvm.org/D95501 / https://reviews.llvm.org/D95502) but I'm posting this as well since it's a simple example usage.
I haven't benchmarked (yet); it's motivated by profiling from a couple of years ago that showed some slowdowns here.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95628
Files:
clang/include/clang/Tooling/DependencyScanning/DependencyScanningService.h
clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h
clang/lib/Tooling/DependencyScanning/DependencyScanningService.cpp
clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
clang/tools/clang-scan-deps/ClangScanDeps.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95628.319887.patch
Type: text/x-patch
Size: 8216 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210128/94934617/attachment.bin>
More information about the cfe-commits
mailing list