[all-commits] [llvm/llvm-project] 6c465a: [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` r...
Jan Svoboda via All-commits
all-commits at lists.llvm.org
Thu Nov 2 15:08:13 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6c465a201b02f3316efc55eef6909080866f6fb0
https://github.com/llvm/llvm-project/commit/6c465a201b02f3316efc55eef6909080866f6fb0
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2023-11-02 (Thu, 02 Nov 2023)
Changed paths:
M clang/include/clang/Driver/Options.td
M clang/include/clang/Lex/HeaderSearchOptions.h
M clang/lib/Frontend/FrontendActions.cpp
M clang/lib/Serialization/ASTWriter.cpp
M clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
A clang/test/Modules/diagnostic-options-mismatch.c
A clang/test/Modules/header-search-paths-mismatch.c
Log Message:
-----------
[clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (#69975)
Deserialization of the `DIAGNOSTIC_OPTIONS` and `HEADER_SEARCH_PATHS`
records is slow and done for every transitively loaded PCM.
Deserialization of these records cannot be skipped, because the words
are VBR6-encoded and we don't store the length of the entire record. We
could either turn them into binary blobs that can be skipped during
deserialization, or skip writing them altogether. This patch takes the
latter approach, since these records are not necessary in scanning PCMs.
The scanner doesn't make any guarantees about the accuracy of
diagnostics, and we always have the same header search paths due to
strict context hashing.
The commit that makes the `DIAGNOSTIC_OPTIONS` record skippable was
originally implemented by @benlangmuir in a downstream repo.
More information about the All-commits
mailing list