Repository navigation
Conversation
Avoid repeated MLIR uniquing of temporary pointers with a bounded interpreter-local cache keyed by address and type. Reuse type sizes and alignments for struct field addressing and serialization on the interpreter fixed target. Clear both caches on reset while retaining all existing pointee memory checks. Add compile-time alias/mutation coverage, a cold-compilation benchmark with a SIMD control, and a performance report. On Apple M2 Pro the 64-element reproducer falls from 17.867s to 14.615s (18.2%); a wider-array case improves 11.3%. The residual SIMD gap is documented. Addresses modular#6975 Assisted-by: AI Signed-off-by: Erik Pragt <[email protected]>
bodiam
marked this pull request as ready for review
October 30, 2026 08:35
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
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.
Compile-time Array indexing repeatedly interns temporary pointer attributes and recalculates struct field layouts. Add a bounded interpreter-local pointer-value cache and reuse type sizes/alignments for the interpreter's fixed target. Both caches clear on reset; pointee values and the existing memory-validity checks remain uncached.
Addresses #6975. Draft for author review. This branch is independent of the #7183 fix in #7427.
Performance report: full methodology, samples, and remaining limitations. The PR includes a reproducible benchmark driver.
Apple M2 Pro / macOS 26.5.1, source-built compilers against upstream 8ed65fc. Medians of three cold object builds, alternating baseline/fixed order, using the identical standard-library package:
The 64-element Array case remains about 7.9x slower than the SIMD control. This reduces the reported overhead; further interpreter work is needed to close that gap, so this PR does not automatically close the issue.
Validation: 15 selected interpreter, memory-error, Array, Span, and pointer test targets passed, including ordinary/parametric execution, 32-bit casts, and compile-time alias/mutation coverage. The benchmark smoke run and mypy check passed.
./bazelw run //:formatand C++ formatting checks passed.Assisted-by: AI