[clang] [clang][Modules] Refresh a module file's access time when it is read (PR #239747)

Qiongsi Wu via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 6 16:06:29 PST 2026


qiongsiwu wrote:

> How would/should this behave when using the inmemory module cache? For example, would we actually run `stat` on a pcm that might not yet exist on disk?

This change in its current shape doesn't add a `stat` call any more. It reuses the status `readImpl` already takes. PCMs served from the in-memory caches never reach `readImpl`, so nothing here touches them. 

> I am also curious if there is a noticeable perf overhead to the added sys calls in a traditional implicit module compilation.

Not really that I observe with the help from Claude running some small imports. A TU importing AppKit, AVFoundation, CoreData, Metal and Network (63 PCMs) takes 56.3 ms (before) vs 56.8 ms (after), below the run-to-run standard deviation of 1.5 ms. So I'd say the difference for traditional implicit modules is negligible. 


https://github.com/llvm/llvm-project/pull/239747


More information about the cfe-commits mailing list