Skip to content

🍒 [clang][modules][deps] Optimize in-process timestamping of PCMs #10655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: swift/release/6.2
Choose a base branch
from

Conversation

jansvoboda11
Copy link

In the past, timestamps used for -fmodules-validate-once-per-build-session were found to be a source of contention in the dependency scanner (D149802, llvm#112452). This PR is yet another attempt to optimize these. We now make use of the new ModuleCache interface to implement the in-process version in terms of atomic std::time_t variables rather the mtime attribute on .timestamp files.

…#137363)

In the past, timestamps used for
`-fmodules-validate-once-per-build-session` were found to be a source of
contention in the dependency scanner
([D149802](https://reviews.llvm.org/D149802),
llvm#112452). This PR is yet
another attempt to optimize these. We now make use of the new
`ModuleCache` interface to implement the in-process version in terms of
atomic `std::time_t` variables rather the mtime attribute on
`.timestamp` files.
@jansvoboda11 jansvoboda11 requested a review from a team as a code owner May 8, 2025 18:03
@jansvoboda11
Copy link
Author

@swift-ci please test

This patch fixes:

  clang/lib/Tooling/DependencyScanning/InProcessModuleCache.cpp:69:7:
  error: 'std::lock_guard' may not intend to support class template
  argument deduction [-Werror,-Wctad-maybe-unsupported]

  clang/lib/Tooling/DependencyScanning/InProcessModuleCache.cpp:80:7:
  error: 'std::lock_guard' may not intend to support class template
  argument deduction [-Werror,-Wctad-maybe-unsupported]

  clang/lib/Tooling/DependencyScanning/InProcessModuleCache.cpp:93:7:
  error: 'std::lock_guard' may not intend to support class template
  argument deduction [-Werror,-Wctad-maybe-unsupported]
@jansvoboda11
Copy link
Author

@swift-ci please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants