]> granicus.if.org Git - clang/commit
[clang-scan-deps] Implementation of dependency scanner over minimized sources
authorAlex Lorenz <arphaman@gmail.com>
Tue, 6 Aug 2019 20:43:25 +0000 (20:43 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Tue, 6 Aug 2019 20:43:25 +0000 (20:43 +0000)
commit3443f89fb18810152432df366deaab5608f89512
tree705d44aa34ce7cd56b3dbe7b074fcec881c2d7df
parent3341cb6ed01a836d397743f6e69963ec22feece7
[clang-scan-deps] Implementation of dependency scanner over minimized sources

This commit implements the fast dependency scanning mode in clang-scan-deps: the
preprocessing is done on files that are minimized using the dependency directives source minimizer.

A shared file system cache is used to ensure that the file system requests and source minimization
is performed only once. The cache assumes that the underlying filesystem won't change during the course
of the scan (or if it will, it will not affect the output), and it can't be evicted. This means that the
service and workers can be used for a single run of a dependency scanner, and can't be reused across multiple,
incremental runs. This is something that we'll most likely support in the future though.
Note that the driver still utilizes the underlying real filesystem.

This commit is also still missing the fast skipped PP block skipping optimization that I mentioned at EuroLLVM talk.
Additionally, the file manager is still not reused by the threads as well.

Differential Revision: https://reviews.llvm.org/D63907

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368086 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
include/clang/Basic/FileManager.h
include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h [new file with mode: 0644]
include/clang/Tooling/DependencyScanning/DependencyScanningService.h [new file with mode: 0644]
include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h
lib/Tooling/DependencyScanning/CMakeLists.txt
lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp [new file with mode: 0644]
lib/Tooling/DependencyScanning/DependencyScanningService.cpp [new file with mode: 0644]
lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
test/ClangScanDeps/Inputs/frameworks/Framework.framework/Headers/Framework.h [new file with mode: 0644]
test/ClangScanDeps/Inputs/frameworks/Framework.framework/PrivateHeaders/PrivateHeader.h [new file with mode: 0644]
test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json [new file with mode: 0644]
test/ClangScanDeps/Inputs/vfsoverlay.yaml [new file with mode: 0644]
test/ClangScanDeps/Inputs/vfsoverlay_cdb.json [new file with mode: 0644]
test/ClangScanDeps/header_stat_before_open.m [new file with mode: 0644]
test/ClangScanDeps/regular_cdb.cpp
test/ClangScanDeps/vfsoverlay.cpp [new file with mode: 0644]
tools/clang-scan-deps/ClangScanDeps.cpp