Repository navigation
fix: lane C train for #1423, #1434, #729, #735, #739 (PRs 1429, 1436, 1414, 1415, 1416) - #1429
Merged
Merged
Conversation
For [T; N] the parser stores the tag AST_TYPE_FIXED_ARRAY (2) in the c field of the AST_TYPE node. rt_collect_calls recursed into c as a node index and walked back into earlier nodes until the stack overflowed, so flowc crashed on a [T; N] local in a function followed by another one. A type holds no calls; the walk now skips its fields and follows next. tests/lang/test_fixed_array_before_fn.flow crashes main's flowc (exit 139) and passes with this change.
…ntegration (#1423) That test compiles the compiler's own modules, rt_summary.flow among them, so its MLIR now carries the AST_TYPE early return in rt_collect_calls. Only that line moves. parity_mlir: PASS.
A second let of the same name in one block counted a type error and printed nothing, so --strict failed with only tc_errs=1. The Stage-A checker now prints FILE:LINE:COL: error: variable 'a' is already declared in this scope, the wording the playground compiler uses. typecheck_rules/duplicate_let fails with main's flowc and passes here.
#pragma omp simd and GCC ivdep tell the C compiler that iterations are independent. An indexed store does not prove that on its own: dst may be src + 1. flowc_cgen_loop_omp_safe now accepts a body of `let` statements followed by one statement that is either a reduction whose accumulator no `let` reads, or a store or select `if` into dst[v] where the noalias analysis made dst restrict (#731) and every expression reads dst only as dst[v]. A reduction whose other operand reads the accumulator (acc = acc + acc * 2) is a recurrence and no longer counts. The rotated while loops from #1363 use the same predicate for their ivdep, and flowc_cgen_body_omp_safe_skip is removed. Other loops keep the clang vectorize request. Carried from the SIMD half of the original #1416 branch; its copy half landed as #1417.
…ntegration for the lane C train That test compiles the compiler's own modules, so its MLIR moves with the typecheck, cgen and profile changes in this train. Only that line moves.
godofecht
force-pushed
the
fix/1423-rt-collect-calls-type
branch
from
October 7, 2026 18:36
e0a8b85 to
ac4f726
Compare
godofecht
enabled auto-merge
October 7, 2026 18:36
A span parameter is immutable, so the example now rebinds a let mut local. doc_examples --check-ledger failed on it. The emitted C for the new example still keeps the span bounds check.
godofecht
force-pushed
the
fix/1423-rt-collect-calls-type
branch
from
October 7, 2026 18:58
ac4f726 to
b0cb077
Compare
This was referenced Oct 7, 2026
This was referenced Oct 7, 2026
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.
Lane C train: five small compiler/src fixes landed together, with one rebase onto main and one bootstrap regeneration.
Closes #1423.
Closes #1434.
rt_collect_callsstops atAST_TYPEnodes.[T; N]keeps the tagAST_TYPE_FIXED_ARRAYinc, and the walk recursed into it as a node index until the stack overflowed.letin one scope reportsvariable 'a' is already declared in this scopeat the binding.#pragma omp simdandGCC ivdeponly with a proof: lets plus one reduction whose accumulator nothing else reads, or one store or select into a noaliasrestrictdst read only at[v]. One predicate covers for loops and rotated whiles. The #731noalias_vectorizegolden still passes.Each PR's source commits are cherry-picked unchanged onto main d16e05d. The PRs' own bootstrap commits are dropped; the bootstrap C is regenerated once, in the last commit. The MLIR corpus digest of
test_typecheck_overload_integration(it compiles the compiler's own modules) is re-recorded for the combined source; only that line moves. #1414's new docs/language/spans.md example assigned to a span parameter, which does not typecheck, sodoc_examples --check-ledgerfailed; it now rebinds alet mutlocal, and its emitted C still keeps the bounds check.Proof
tests/lang/test_fixed_array_before_fn.flow; it passes here.typecheck_rules/duplicate_letfails with main's flowc, passes here.tests/cgen/span_bounds_rebindingfails with main's compiler (missing fault path), passes here.compile_profile/ctor_clock_gatedfails against main's bootstrap, passes here.for_simd_dependenceandfor_vectorize_pragmaand emitsreduction(+:acc)/ivdep for the recurrence infor_simd_recurrence.Gates (macOS arm64, on this head)
Selftest
flowc: PASS;--regenfixed point at gen3;--verifyPASS, and again after the rebase onto 524633d (no compiler/ change in between); self_host_full ALL PASS; roundtrip ALL PASS; tests/cgen 141/0 (incl. noalias_vectorize, for_simd_*, span_bounds_rebinding); test-lang 275/0; test-runtime 34/0; tests/tools PASS; parity_mlir PASS (2526 corpus programs, 0 fail); typecheck_rules 139/0; parity_typecheck, parity_lowering and fmt_check clean; compile_profile 7/0; rt_summary PASS; tests/cli 152/2.Known local drift, also on main: tests/cli
jit_helloandtest_mlir; parity_mlir corpus digests for files main has not recorded.Risk
Low to moderate. #1416 narrows when SIMD pragmas are emitted, so some loops lose
omp simd/ivdep and keep the clang vectorize request. The others are local fixes.