You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FIR-G: apply dead-code elimination, constant folding, inlining and general pipeline fusion (candidates are only reported today) #686
#877 is useful progress but does not appear to complete this issue's stated scope. The merged self-host change adds compiler/src/pipeline_fusion.flow, wired into Stage-A, and implements the narrow adjacent scale_f32/scale_f64 fusion shape. The issue still calls for FIR-G interprocedural DCE, constant folding, inline scoring/inlining, and general loop/pipeline fusion. Keep #686 open until those remaining transforms are actually ported and locally qualified. Exact next action: split the missing FIR-G passes into focused implementation slices or update this issue's scope if the intended target has narrowed; do not mark the whole optimisation-pass port complete based on the current single fusion transform.
changed the title [-][Self-Hosting Phase 3] Port FIR-G Optimisation Passes and Pipeline Fusion[/-][+]FIR-G: apply dead-code elimination, constant folding, inlining and general pipeline fusion (candidates are only reported today)[/+]on Sep 30, 2026
Implemented and merged #1161. FIR-G now applies safe trivial inlining for pure single-block expression functions with parameter loads, rebuilding dense SSA metadata and call-graph edges. flow fir-g --apply inline is covered by text, JSON, and --apply all cases. Focused FIR validation is 71 passed, 0 failed. Remaining scope: multi-block/function inlining and general loop/pipeline fusion.
The inliner slice is merged in #1161. The remaining work is multi-block/function inlining and general loop/pipeline fusion. The current native AST fusion already handles the documented map, scale, and offset compositions.
Activity
Harvest: compositional @rt_safe (#776) and FIR-G opt passes port (#686)…
godofecht commentedon Sep 11, 2026
#877 is useful progress but does not appear to complete this issue's stated scope. The merged self-host change adds
compiler/src/pipeline_fusion.flow, wired into Stage-A, and implements the narrow adjacentscale_f32/scale_f64fusion shape. The issue still calls for FIR-G interprocedural DCE, constant folding, inline scoring/inlining, and general loop/pipeline fusion. Keep #686 open until those remaining transforms are actually ported and locally qualified. Exact next action: split the missing FIR-G passes into focused implementation slices or update this issue's scope if the intended target has narrowed; do not mark the whole optimisation-pass port complete based on the current single fusion transform.[-][Self-Hosting Phase 3] Port FIR-G Optimisation Passes and Pipeline Fusion[/-][+]FIR-G: apply dead-code elimination, constant folding, inlining and general pipeline fusion (candidates are only reported today)[/+]godofecht commentedon Sep 30, 2026
State on main (ee5048d):
fir_opts.py(candidate scoring) ascompiler/src/fir_opts.flowand the candidate discovery intools/fir/graph.flow;pipeline_fusion.pywas deleted in Port the remaining Python commands and tools to Flow #1064 with no caller;compiler/src/pipeline_fusion.flow(Harvest: compositional @rt_safe (#776) and FIR-G opt passes port (#686) #877) fuses adjacentscale_f32/scale_f64stages in Stage-A. Gate:tests/fir/run.sh, 57 passed.The port part is done. What is left is new optimisation work; retitled to say so.
fir: --apply passes for dead_elim, const_fold and dce (#1156)
godofecht commentedon Oct 1, 2026
Implemented and merged #1161. FIR-G now applies safe trivial inlining for pure single-block expression functions with parameter loads, rebuilding dense SSA metadata and call-graph edges.
flow fir-g --apply inlineis covered by text, JSON, and--apply allcases. Focused FIR validation is 71 passed, 0 failed. Remaining scope: multi-block/function inlining and general loop/pipeline fusion.godofecht commentedon Oct 1, 2026
The inliner slice is merged in #1161. The remaining work is multi-block/function inlining and general loop/pipeline fusion. The current native AST fusion already handles the documented map, scale, and offset compositions.