summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[clang][clang-scan-deps] Aggregate the full dependency information."Michael Spencer2019-12-111-9/+2
| | | | | | This reverts commit f978ea498309adaebab8fbf1cd6e520e7e0e11f1. It broke clang-ppc64be-linux, but not sure why yet.
* [clang][clang-scan-deps] Aggregate the full dependency information.Michael Spencer2019-12-111-2/+9
| | | | Differential Revision: https://reviews.llvm.org/D70268
* [clang][clang-scan-deps] Add support for extracting full module dependencies.Michael Spencer2019-10-301-7/+23
| | | | | | | | | | | 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-23/+7
| | | | | | | | 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-7/+23
| | | | | | | | | 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 "Include sanitize blacklist and other extra deps as part of scan-deps ↵Kousik Kumar2019-10-171-2/+0
| | | | | | | | | | | | | | | | | | output" This test is failing on Windows bots, revert for now (will check the right fix and retry the patch). Summary: This reverts commit 962ca076e51c25a7a08f4e0d329c65328a635bdb. Reviewers: Bigcheese, jkorous, arphaman Subscribers: dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69079 llvm-svn: 375079
* Include sanitize blacklist and other extra deps as part of scan-deps outputKousik Kumar2019-10-171-0/+2
| | | | | | | | | | | | | | | | | Summary: Clang's -M mode includes these extra dependencies in its output and clang-scan-deps should have equivalent behavior, so adding these extradeps to output just like how its being done for ".d" file generation mode. Reviewers: arphaman, dexonsmith, Bigcheese, jkorous Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69017 llvm-svn: 375074
* [clang-scan-deps] remove dots and dots dots from the reported file ↵Alex Lorenz2019-09-121-2/+6
| | | | | | | | | | dependency paths This resolves differences observed on LLVM + Clang when running the comparison between canonical dependencies (full preprocessing, no file manager reused), and dependencies obtained when the file manager was reused between the full preprocessing invocations. llvm-svn: 371751
* [clang-scan-deps] add skip excluded conditional preprocessor block ↵Alex Lorenz2019-09-111-5/+18
| | | | | | | | | | | | | | | 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] NFC, remove outdated implementation commentAlex Lorenz2019-08-301-1/+0
| | | | | | | | There's no need to purge symlinked entries in the FileManager, as the new FileEntryRef API allows us to compute dependencies more accurately when the FileManager is reused. llvm-svn: 370493
* [clang-scan-deps] NFC, refactor the DependencyScanningWorker to use a consumerAlex Lorenz2019-08-301-35/+39
| | | | | | | | | | | to report the dependencies to the client This will allow the scanner to report modular dependencies to the consumer. This will also allow the scanner to accept regular cc1 clang invocations, e.g. in an implementation of a libclang C API for clang-scan-deps, that I will add follow-up patches for in the future. llvm-svn: 370425
* [clang-scan-deps] reuse the file manager across invocations ofAlex Lorenz2019-08-291-1/+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] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-141-2/+2
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942
* [clang-scan-deps] Implementation of dependency scanner over minimized sourcesAlex Lorenz2019-08-061-13/+43
| | | | | | | | | | | | | | | | | | | 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
* [clang-scan-deps] Introduce the DependencyScanning library with theAlex Lorenz2019-06-261-0/+149
thread worker code and better error handling This commit extracts out the code that will powers the fast scanning worker into a new file in a new DependencyScanning library. The error and output handling is improved so that the clients can gather errors/results from the worker directly. Differential Revision: https://reviews.llvm.org/D63681 llvm-svn: 364474
OpenPOWER on IntegriCloud