summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/DependencyScanning/DependencyScanningService.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang][clang-scan-deps] Add support for extracting full module dependencies.Michael Spencer2019-10-301-4/+4
| | | | | | | | | | | This is a recommit of d8a4ef0e685c with the nondeterminism fixed. This adds experimental support for extracting a Clang module dependency graph from a compilation database. The output format is experimental and will change. It is currently a concatenation of JSON outputs for each compilation. Future patches will change this to deduplicate modules between compilations. Differential Revision: https://reviews.llvm.org/D69420
* Revert "[clang][clang-scan-deps] Add support for extracting full module ↵Michael Spencer2019-10-301-4/+4
| | | | | | | | dependencies." This reverts commit d8a4ef0e685cec1fc73d4953b48220b649d05b40. This commit broke some of the bots. I believe it's due to nondeterminism. Will fix and recommit.
* [clang][clang-scan-deps] Add support for extracting full module dependencies.Michael Spencer2019-10-301-4/+4
| | | | | | | | | This adds experimental support for extracting a Clang module dependency graph from a compilation database. The output format is experimental and will change. It is currently a concatenation of JSON outputs for each compilation. Future patches will change this to deduplicate modules between compilations. Differential Revision: https://reviews.llvm.org/D69420
* [clang-scan-deps] add skip excluded conditional preprocessor block ↵Alex Lorenz2019-09-111-2/+4
| | | | | | | | | | | | | | | preprocessing optimization This commit adds an optimization to clang-scan-deps and clang's preprocessor that skips excluded preprocessor blocks by bumping the lexer pointer, and not lexing the tokens until reaching appropriate #else/#endif directive. The skip positions and lexer offsets are computed when the file is minimized, directly from the minimized tokens. On an 18-core iMacPro with macOS Catalina Beta I got 10-15% speed-up from this optimization when running clang-scan-deps on the compilation database for a recent LLVM and Clang (3511 files). Differential Revision: https://reviews.llvm.org/D67127 llvm-svn: 371656
* [clang-scan-deps] reuse the file manager across invocations ofAlex Lorenz2019-08-291-2/+3
| | | | | | | | | | | | | | | | the dependency scanner on a single worker thread This behavior can be controlled using the new `-reuse-filemanager` clang-scan-deps option. By default the file manager is reused. The added test/ClangScanDeps/symlink.cpp is able to pass with the reused filemanager after the related FileEntryRef changes landed earlier. The test test/ClangScanDeps/subframework_header_dir_symlink.m still fails when the file manager is reused (I run the FileCheck with not to make it PASS). I will address this in a follow-up patch that improves the DirectoryEntry name modelling in the FileManager. llvm-svn: 370420
* [clang-scan-deps] Implementation of dependency scanner over minimized sourcesAlex Lorenz2019-08-061-0/+16
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 llvm-svn: 368086
OpenPOWER on IntegriCloud