[PATCH] D60233: [clang-scan-deps] initial outline of the tool that runs preprocessor to find dependencies over a JSON compilation database

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 3 14:51:03 PDT 2019


arphaman created this revision.
arphaman added a reviewer: Bigcheese.
Herald added subscribers: jfb, dexonsmith, jkorous, mgorny.
Herald added a project: clang.

This patch introduces an outline for the `clang-scan-deps` tool that will be used to implement fast dependency discovery phase using implicit modules for explicit module builds.

The initial version of the tool works by computing non-modular header dependencies for files in the compilation database without any optimizations (i.e. without source minimization from https://reviews.llvm.org/D55463). The tool spawns a number of worker threads to run the clang compiler workers in parallel.

The immediate goal for `clang-scan-deps` is to create a `ClangScanDeps` library which will be used to build up this tool to use the source minimization and caching multi-threaded filesystem to implement the optimized non-incremental dependency scanning phase for a non-modular build. This will allow us to do benchmarks and comparisons for performance that the minimization and caching give us, and maybe setup CI to track that performance. @Bigcheese will then extend the tool to have the support for computing modular dependencies for Clang modules. The tool could possibly interact with build systems in the future if desired, but it's not our immediate goal.

This tool is based on code that was included in the original WIP patch I posted before the dev meeting last October: https://reviews.llvm.org/D53354 .


Repository:
  rC Clang

https://reviews.llvm.org/D60233

Files:
  test/ClangScanDeps/Inputs/header.h
  test/ClangScanDeps/Inputs/regular_cdb.json
  test/ClangScanDeps/regular_cdb.cpp
  tools/CMakeLists.txt
  tools/clang-scan-deps/CMakeLists.txt
  tools/clang-scan-deps/ClangScanDeps.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60233.193600.patch
Type: text/x-patch
Size: 9654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190403/7fcd8546/attachment.bin>


More information about the cfe-commits mailing list