Repository navigation
Cache validated run artifacts and reduce cold compilation costs - #88
Merged
Merged
Conversation
check-seed rejected the previous seed after os_shim.c gained cache retention helpers and Windows junction-safe cleanup. Regenerate the seed and shim fingerprint; bootstrap, fixed-point and cross-compilation checks pass.
macOS eviction silently used a CStr borrowed from a freed root String. Bind the owner through the C call and bind executable paths in the debug fixture. Add a glibc freed-memory poisoning regression that fails with the previous compiler and passes with this 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.
Repeated
plum runcommands currently regenerate LLVM and compile all native inputs. This adds validated reuse of generated IR and native objects, while linking a fresh executable for every run, and reduces cold compiler work without changing emitted IR.Refs #63. This implements the artifact-cache and cold-compilation work; the full issue's performance targets and per-module compilation remain open.
Changes
build,check,emit-llvm, andtestuncached.Measurements
Three sequential samples on Linux x86_64 with Clang 22.1.8, comparing release compiler builds. Application runs use the default debug mode; complete samples and hashes are in the measurement report.
LLVM output is byte-identical for the hello example, JSON example, and complete compiler. Warm runs still preprocess native inputs, validate the toolchain, and link. The provisional 200 ms warm-run and 10% cache-miss-overhead targets are not met, and the gh-dash/TUI workload has not been measured.
Validation
git diff --checkpasses.See results and limitations, validation evidence, and the future incremental-compilation proposal.
Windows CI correction
The first CI run passed Linux, Linux arm64 and macOS validation. Windows compiler construction, ordinary programs and LSP passed, but a cache fixture containing ü in its filename repeatedly missed: saved ANSI argv bytes were rejected by UTF-8 decoding. Commit 11d7bc5 validates the saved path bytes directly, rejects malformed hex/NUL paths, and adds a Linux byte-filename regression for hits and edited-source misses. The harness also recognizes MSYS/Cygwin Python when guarding Unix-only PTY, symlink and executable-path fixtures. Native Windows console attachment remains outside these Unix PTY tests.
The corrected compiler and seed pass local cache, unit, formatting, fixed-point bootstrap and cross-compilation checks. Windows runtime checks pass in the corrected CI run. Recorded benchmark data retains the original implementation's digest.
macOS retention correction
The new retention check exposed a dangling CStr: the cache-root String
was freed before the native pruner read it. Commit d469d02 keeps the
owning String alive through the call and fixes the same borrowing pattern
in the debug fixture. A Linux allocator-poisoning regression fails against
the previous compiler and passes with the correction.
All 412 local cache assertions, compiler unit/format checks and seed
bootstrap checks pass. macOS platform/cache checks and the required
Clang 18 Linux object-cache/debug job pass in
the corrected CI run.
The remaining jobs are still running at this update.