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
JIT: execute optimizer loop bodies with resumable invalidation polls #435
Cover zero/one/many iterations, multiple loop-carried locals, nested control, guard failure, and invalidation races under normal and TSan gates.
Landed checkpoints
c152d97: OSR-only tier arbitration reaches optimizer backedges; AArch64 copies header-to-body SSA arguments, executes and path-accounts one complete numeric body iteration, and recovers updated loop-carried values.
e65880c: supported numeric bodies apply body-to-header copies and stay native across multiple iterations; every header polls invalidation and budget/checkpoint distance, side-exiting exact current state before a pending boundary.
e9d0dac: edge assignments use deterministic parallel-copy scheduling with reusable cycle scratch; swapped multi-local backedges, exact checkpoint recovery, and non-number guard refusal pass normal and TSan JIT gates.
9bf1034: one equal-cost inner branch diamond stays native through both arms, a shared merge/latch, exact per-iteration accounting, and header checkpoint recovery; unsupported shapes still fail closed.
6852f5f: an instrumented release marker deterministically races invalidation after completed native work; the next header poll reconstructs exact state under full normal and TSan JIT gates.
All declared first-region acceptance is complete. General unequal/deeper reducible CFGs continue in #438. Closure awaits the exact current main CI run.
AArch64 executes either the exit header or one complete straight-line numeric body iteration, with path-specific step accounting.
The body backedge recovers updated loop-carried locals at the next header without replaying the header or body.
Budget/checkpoint preflight remains conservative and exact.
Compiler recovery tests verify the incremented local; the VM test separately proves exact manual eligibility and real run-loop backedge entry. Normal and TSan focused JIT both passed 113/113 with zero leaks.
No acceptance box is checked yet: native code still returns at each backedge, so parallel backedge copies, multi-iteration execution, and internal safepoint/invalidation polls remain.
Body-to-header SSA copies now feed a generated native backedge.
Supported numeric loops execute multiple iterations per OSR entry.
Every native header polls the owner generation and checks remaining budget/checkpoint distance.
A pending poll side-exits the exact current header before more work; completed iterations remain accounted and recoverable.
Compiler coverage now includes zero, one, and many iterations plus an exact checkpoint-boundary zero-work exit.
End-to-end VM coverage proves real backedge entry, exact results, and unchanged total step deltas.
Normal and TSan focused JIT both passed 113/113 with zero leaks. Three acceptance items are now checked; general parallel-copy cycles and broader/nested loop stress remain open. Benchmark scores remain unchanged because the published workloads do not enter this optimizer subset.
Edge block arguments are now lowered as true parallel assignments.
A deterministic scheduler emits safe acyclic moves and breaks arbitrary cycles with one reusable scratch slot.
A four-local native loop swaps two values on every backedge while advancing a third, proving exact exit and checkpoint reconstruction.
End-to-end OSR now explicitly verifies a non-number guard refusal leaves IP, state, and step accounting untouched.
README and optimizer documentation describe the current boundary without stale loop/stack-map claims.
Normal and TSan zig build test-jit both passed 115/115 with zero leaks. The parallel-copy acceptance item is complete. The final coverage item remains open for nested/broader control and a deterministic invalidation race during an active native loop. Published benchmark scores remain unchanged because those workloads do not enter this optimizer subset.
A loop OSR region may now contain one equal-cost inner if/else diamond. Both arms receive exact SSA edge assignments, execute only the selected operations, merge into a shared latch, and return through the native backedge. The compiler proves equal instruction cost with checked arithmetic and rejects every unsupported shape before publication.
The regression exercises both arms over multiple iterations, verifies the merged result and 84-step exit, then forces a header side exit after exactly two 20-step iterations and reconstructs all locals. Normal and TSan loop-OSR filters each passed 4/4 with zero leaks. README/docs describe this narrow boundary; benchmark scores remain unchanged.
The aggregate coverage item stays open for a deterministic invalidation race during active native execution and unequal/deeper nested control (or a separately linked follow-up boundary).
Checkpoint 6852f5f2 is on main and completes the declared first loop-region evidence.
Instrumented test artifacts now release-publish a marker only after a complete native backedge. A waiting invalidator changes the atomic owner generation, and the subsequent generated header poll side-exits with a positive whole-iteration step count, exact header IP, block-entry recovery, and the matching loop local. Production artifacts do not emit the observer load/store.
Combined normal and TSan zig build test-jit passed 117/117 with zero leaks. All #435 boxes are checked; broader unequal/deeper reducible control is explicitly tracked by #438. README/docs are current, and benchmark scores remain unchanged because the published workloads do not enter this subset. I will close #435 only after the exact current main CI run passes.
Closed against exact main SHA 612340d6: CI run 29877847695 completed successfully with 42 successful jobs, one expected skipped nightly lane, and zero failures. All declared first-region acceptance remains checked; broader reducible CFGs continue in #438.
Activity
feat(jit): execute full loop iterations through OSR (#435)
chrisbbreuer commentedon Jul 21, 2026
Checkpoint
c152d97ais onmain.Compiler recovery tests verify the incremented local; the VM test separately proves exact manual eligibility and real run-loop backedge entry. Normal and TSan focused JIT both passed 113/113 with zero leaks.
No acceptance box is checked yet: native code still returns at each backedge, so parallel backedge copies, multi-iteration execution, and internal safepoint/invalidation polls remain.
feat(jit): keep numeric OSR loops native (#435)
chrisbbreuer commentedon Jul 21, 2026
Checkpoint
e65880cais onmain.Normal and TSan focused JIT both passed 113/113 with zero leaks. Three acceptance items are now checked; general parallel-copy cycles and broader/nested loop stress remain open. Benchmark scores remain unchanged because the published workloads do not enter this optimizer subset.
feat(jit): preserve parallel OSR backedges (#435)
chrisbbreuer commentedon Jul 21, 2026
Checkpoint
e9d0dac0is onmain.Normal and TSan
zig build test-jitboth passed 115/115 with zero leaks. The parallel-copy acceptance item is complete. The final coverage item remains open for nested/broader control and a deterministic invalidation race during an active native loop. Published benchmark scores remain unchanged because those workloads do not enter this optimizer subset.feat(jit): execute nested OSR branches (#435)
chrisbbreuer commentedon Jul 21, 2026
Checkpoint
9bf10349is onmain.A loop OSR region may now contain one equal-cost inner
if/elsediamond. Both arms receive exact SSA edge assignments, execute only the selected operations, merge into a shared latch, and return through the native backedge. The compiler proves equal instruction cost with checked arithmetic and rejects every unsupported shape before publication.The regression exercises both arms over multiple iterations, verifies the merged result and 84-step exit, then forces a header side exit after exactly two 20-step iterations and reconstructs all locals. Normal and TSan loop-OSR filters each passed 4/4 with zero leaks. README/docs describe this narrow boundary; benchmark scores remain unchanged.
The aggregate coverage item stays open for a deterministic invalidation race during active native execution and unequal/deeper nested control (or a separately linked follow-up boundary).
test(jit): race invalidation against native loops (#435)
chrisbbreuer commentedon Jul 21, 2026
Checkpoint
6852f5f2is onmainand completes the declared first loop-region evidence.Instrumented test artifacts now release-publish a marker only after a complete native backedge. A waiting invalidator changes the atomic owner generation, and the subsequent generated header poll side-exits with a positive whole-iteration step count, exact header IP, block-entry recovery, and the matching loop local. Production artifacts do not emit the observer load/store.
Combined normal and TSan
zig build test-jitpassed 117/117 with zero leaks. All #435 boxes are checked; broader unequal/deeper reducible control is explicitly tracked by #438. README/docs are current, and benchmark scores remain unchanged because the published workloads do not enter this subset. I will close #435 only after the exact currentmainCI run passes.chrisbbreuer commentedon Jul 22, 2026
Closed against exact
mainSHA612340d6: CI run 29877847695 completed successfully with 42 successful jobs, one expected skipped nightly lane, and zero failures. All declared first-region acceptance remains checked; broader reducible CFGs continue in #438.