Repository navigation
Conversation
…731) Emit __flowc_na_ clones when some call sites are proven, extract restrict temps from span .data, and treat embedded struct fields as distinct LOCAL roots. Add C/MLIR/vectorize goldens and a language/noalias page. Co-authored-by: Abhishek Shivakumar <[email protected]>
The negative token `mix_add(int32_t* restrict` is a substring of the specialized clone. Expect 4.0 after the aliasing scale of the already doubled buffer. Co-authored-by: Abhishek Shivakumar <[email protected]>
godofecht
added a commit
that referenced
this pull request
Oct 6, 2026
Propagates local region/non-alias proofs into parameters and temporaries, defines the soundness boundary for restrict/LLVM noalias metadata, and hardens the predicate against signed-overflow mis-certification. Supersedes #1368. Closes #731. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <[email protected]>
Contributor
Author
|
Superseded by #1388 (merged as 7cd0ce3), which landed the mixed-site noalias clones, span |
godofecht
added a commit
that referenced
this pull request
Oct 7, 2026
…om closed PRs Salvaged from closed pull requests whose code already landed: - #1360 (region inference, code merged as #1390): region-inference.md, the tests/cgen region_inference and region_unproven goldens, and the spec, book, spans, lifetime-domains, README, spec-index, nav and CHANGELOG lines. - #1368 (noalias, code merged as #1388): the spans.md paragraph on restrict .data temporaries and its noalias.md link. - #1380 (tail-resumptive effects, code merged as #1349): the spec-index row for effects-continuations.md. #1417 landed after #1360 and keeps an unproven forward copy as an ordered element loop. The region_inference golden and the docs now say that, in place of the memmove the closed branch expected. The golden fails on the pre-#1417 compiler, which emitted memmove.
godofecht
added a commit
that referenced
this pull request
Oct 7, 2026
…om closed PRs (#1425) Salvaged from closed #1360 (region-inference.md, region_inference and region_unproven goldens, spec/book/index lines), #1368 (spans.md restrict .data paragraph) and #1380 (spec-index row for effects-continuations.md). The region_inference golden and docs follow #1417: an unproven parameter copy stays an ordered loop.
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.
Intent
Part of #731 (parent #727). Related: #733 (vectorization-improvement tests), #694, #664.
PR #1344 landed the first fail-closed certificate and restrict/
{llvm.noalias}emission. This slice fills the remaining listed gaps: mixed-site specialization clones (option 3), span.datarestrict temps, struct-field provenance, and structural vectorization-improvement tests.Smallest useful change: extend
noalias.flowplus the two backends; add C/MLIR/lang/vectorize proofs anddocs/language/noalias.md. No frontend syntax change.Overlap check
Overlap / dependency notes:
9a278876).compiler/src/{noalias,cgen,mlirgen}.flow, the noalias tests, and the new docs page.Evidence
Baseline before this change: #1344 on
main(9a278876). Mixed sites stayed fully aliasable; span params had no.datarestrict temps; embedded struct fields did not get distinct LOCAL roots; no vectorize golden existed.Targeted proof that exercises the changed behaviour (pre-testing revision
206cddff; gates follow on this PR):mix_add: aliasable original +__flowc_na_mix_addrestrict clone; proven call rewritten, overlapping call stays on the original.span_add:T* restrict __flowc_na_d_<name> = name.datatemps.field_add/px/py: restrict on distinct embedded fields.scale_into:float* restrictplus omp/clang/GCC vectorize hints;scale_aliasstays unqualified.Why that proof would detect the old failure or regression: C goldens (
noalias_restrict,noalias_vectorize) andtests/scripts/noalias_mlir.flowassert the new tokens; lang tests check mixed-clone and field-copy semantics still match sequential assignment.Repository gate(s) run:
./flow test-lang,./flow tool tests/cgen/run.flow(noalias goldens),./flow tool tests/scripts/noalias_mlir.flow,./flow tool tests/scripts/noalias_vectorize.flow,./flow tool scripts/check_pkg_parity.flow,./flow tool compiler/scripts/parity_mlir.flow../compiler/scripts/bootstrap_from_c.sh --regenthen--verify.Generated/bootstrap state, if any:
206cddff. Bootstrap regeneration is a separate commit.Risk
C/MLIR output changes only when the certificate proves disjointness or a mixed-site clone is emitted. Wrong restrict remains undefined behaviour; the analysis stays fail-closed.
docs/language/noalias.mdregistered indocs/nav.json;spans.mdand CHANGELOG updated).docs/project/Questions.mdupdated if this needs a language-design decision. (No new language-design decision.)Compatibility
docs/project/CHANGELOG.md. (Backend-only annotation; CHANGELOG notes the new clone / span / field rules.)Remaining gaps
Part of #731. Still fail-closed (not this slice):
lo/hi) stay unknown.Agent handoff
Agent/provider/session: Cursor Cloud Agent (
bc-1a5194fe-61a7-57d7-82d1-1633c816ee8f).Any remaining blocker is recorded in GitHub rather than only in local/session state. Do not merge until review.