llvm-project
2f9deb22 - [clang][deps] Fast path before the line-by-line walk (#239449)

Commit
3 days ago
[clang][deps] Fast path before the line-by-line walk (#239449) `isPreprocessedModuleFile()` scans the whole source line by line, looking for `__preprocessed_module` or `__preprocessed_import` directives. This scan is pretty expensive. Add a fast path by checking for the presence of the `__preprocessed_` string. On `swiftlang/llvm-project`, a cache hit through `clang-cache` with its default inline dependency scan drops - from 201.4 to 189.8 ms (-5.7%) on Windows - from 107.7 to 100.3 ms (-6.9%) on Linux
Author
Parents
Loading