Key the object cache on the sources that generate the objects - #19
Merged
dreamsailing59-ops merged 1 commit intoAug 22, 2026
Merged
Conversation
DOLLLVM_CACHE_VERSION is a hand-edited string, so the generated-object cache only invalidates when someone remembers to bump it. It does not invalidate when the emitter changes, which is the case that matters: a stale object is a measurement of code that is no longer in the tree. Hash the sources that decide what gets emitted and fold the digest into every job key. The file list is a CONFIGURE_DEPENDS glob rather than an explicit list -- an explicit list has to be maintained, and the backend rewrite renamed most of the files one would have contained. Editing any covered file re-runs configure and changes the digest, which changes every cache key. Verified: touching src/backend/llvm/psq.cpp moved the digest from 0f6d8569 to 880db2ba across the 46 covered files, and 28/28 ctest passes with it applied. Note this branch is cut from main, which does not currently link against the official LLVM 20 Windows package; the digest was verified on a tree that also carries that link fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
DOLLLVM_CACHE_VERSIONis a hand-edited string, so the generated-object cache only invalidates when someone remembers to bump it. It does not invalidate when the emitter changes — which is the case that matters, because a stale object means measuring code that is no longer in the tree.Fix
Hash the sources that decide what gets emitted and fold the digest into every job key:
A
CONFIGURE_DEPENDSglob rather than an explicit file list, deliberately: an explicit list has to be maintained, and the recent backend rewrite renamed most of the files one would have contained. Editing any covered file re-runs configure, changes the digest, and changes every cache key.Verification
Touching
src/backend/llvm/psq.cppmoved the digest across the 46 covered files:28/28 ctest with it applied.
Note
This branch is cut from
main, which does not currently link against the official LLVM 20 Windows package (see the target-registration PR). The digest was verified on a tree that also carries that link fix.