[all-commits] [llvm/llvm-project] daa92c: [clang][deps] Avoid `CompilerInvocation` copies (#...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Fri Jun 26 09:34:16 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: daa92c74194c7bfbc2bc7b1698c346d2e11f6bed
      https://github.com/llvm/llvm-project/commit/daa92c74194c7bfbc2bc7b1698c346d2e11f6bed
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2026-06-26 (Fri, 26 Jun 2026)

  Changed paths:
    M clang/include/clang/DependencyScanning/DependencyActionController.h
    M clang/include/clang/Frontend/CompilerInvocation.h
    M clang/lib/DependencyScanning/DependencyScannerImpl.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Tooling/DependencyScanningTool.cpp
    M clang/unittests/Frontend/CompilerInvocationTest.cpp

  Log Message:
  -----------
  [clang][deps] Avoid `CompilerInvocation` copies (#205632)

When constructing the dependency graph for compilation caching, the
dependency scanner needs to do some extra operations on the compiler
invocations. Historically, these have not utilized the copy-on-write
variant well. This patch takes care to minimize `CompilerInvocation`
copies, which improves incremental scans with populated up-to-date
scanning module cache by 16-18%. Together with
https://github.com/llvm/llvm-project/pull/203350 which operates in the
same space, wall-times are improved by 1.54x and instruction counts by
1.66x.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list