Repository navigation
feat: split compile-profile phases and add Tier-1 matrix (#735) - #1350
Merged
Merged
Conversation
Time monomorphize and lowering apart from codegen, count AST cache probes as incremental_cache, and have compile_bench emit a Tier-1 matrix row plus >10% bottleneck follow-ups. Co-authored-by: Abhishek Shivakumar <[email protected]>
The Flow helper collided with the static flowc_prof_ns[N] timer array in the profile embed, so the host compiler failed to build. Co-authored-by: Abhishek Shivakumar <[email protected]>
The identifier linux is a predefined macro on this host, so the Tier-1 slot helper failed to compile. Co-authored-by: Abhishek Shivakumar <[email protected]>
Co-authored-by: Abhishek Shivakumar <[email protected]>
Co-authored-by: Abhishek Shivakumar <[email protected]>
…erate bootstrap Conflicts: compiler/bootstrap (took main's, then bootstrap_from_c.sh --regen, fixed point at gen2 on macOS and Linux x86-64; checked-in flowc_stage_a rebuilt for Linux x86-64 like main's) and docs/project/CHANGELOG.md (kept main's entries and this PR's).
godofecht
added a commit
that referenced
this pull request
Oct 6, 2026
Only compiler/bootstrap/flowc_stage_a conflicted (after #1350); took main's binary (C already matches).
godofecht
added a commit
that referenced
this pull request
Oct 6, 2026
godofecht
added a commit
that referenced
this pull request
Oct 6, 2026
Bring #1350 compile-profile changes onto the cold-start compare branch, restore --python-code / python_ms emission lost in the merge, and regen bootstrap (Linux x86-64 ELF) to the fixed point.
godofecht
added a commit
that referenced
this pull request
Oct 6, 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.
Intent
Part of #735 (parent #727). First slice landed in #1343.
Split
monomorphizeandloweringout ofcodegen, add anincremental_cachephase row, emit a Tier-1 measurement matrix fromcompile_bench, and attach follow-up issue links for every >10% bottleneck.Overlap check
Overlap / dependency notes:
FLOWC_PROFILEand process-level compile-to-result. This continues that slice only.flowc_parse_cached(schema salt for [Performance #727] Add incremental compilation and content-addressed frontend/codegen caching #736). Timing around the existing probe is additive.compile_bench. New fields (phase_monomorphize_ms, matrix, bottlenecks) are additive.Evidence
Baseline before this change:
monomorphizeandloweringwere present in the JSON with 0 ms (still inside codegen).parse.Targeted proof that exercises the changed behaviour:
Repository gate(s) run:
flowc: PASS,profile_ok=1)./flow tool tests/scripts/compile_profile.flow(5 passed)./flow tool wiki_nav(consistent)./compiler/scripts/bootstrap_from_c.sh --regen(fixed point at gen2)./compiler/scripts/bootstrap_from_c.sh --verify(PASS bootstrap C matches compiler/src)Generated/bootstrap state, if any:
compiler/bootstrap/flowc_stage_a.cregenerated to a fixed point and committed separately (fix: regenerate bootstrap C after compile-profile phase split).Risk
Compatibility, performance, security, lifetime, backend, or release implications:
Opt-in only. Phase ids 0–7 stay stable;
incremental_cacheis id 8.codegenno longer includes the nested mono/lowering spans.compile_benchsummary gains matrix/bottleneck fields; existing keys stay.No unresolved language/API design decision is being implemented implicitly.
No unrelated generated artifacts or local state are included.
Docs changed when user-visible behaviour or syntax changed.
docs/project/Questions.mdupdated if this needs a language-design decision.Compatibility
docs/project/CHANGELOG.md.Additive profile phases and
compile_benchmatrix fields are noted under Unreleased.Remaining gaps
Part of #735. Still open after this slice:
codegenbucket ([MLIR Performance #727] Bound MLIR/JIT compile latency and time-to-first-result #748).Agent handoff
Agent/provider/session: Cursor cloud agent, branch
cursor/compile-profile-gaps-735-8206.