Skip to content

[clang][deps] Skip slow UNHASHED_CONTROL_BLOCK records (#69975) #7746

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

Merged

Conversation

jansvoboda11
Copy link

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.

(cherry picked from commit 6c465a2)

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.

(cherry picked from commit 6c465a2)
@jansvoboda11
Copy link
Author

@swift-ci please test

@jansvoboda11 jansvoboda11 merged commit d28b524 into stable/20230725 Nov 3, 2023
@jansvoboda11 jansvoboda11 deleted the jan_svoboda/20230725-skip-slow-pcm-records branch November 3, 2023 05:17
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.

1 participant