Skip to content

Rebuild register allocation around indexed ranges and Fast - #498

Merged
Milky2018 merged 7 commits into
devfrom
milky/iss-408-regalloc2-core
Aug 11, 2026
Merged

Rebuild register allocation around indexed ranges and Fast#498
Milky2018 merged 7 commits into
devfrom
milky/iss-408-regalloc2-core

Conversation

@Milky2018

Copy link
Copy Markdown
Owner

Summary

  • remove post-hoc bridge, residency, edge-affinity, and split heuristics
  • replace sorted occupancy arrays with an intrusive range index and merged probes
  • eliminate dense edge-transfer scans
  • add spillset-preserving gap splits and prioritized second-chance allocation
  • replace SinglePass with an independent reverse-scan Fast allocator

Verification

  • moon check modules/regalloc --target native --warn-list +73
  • moon test modules/regalloc --target native --warn-list +73 (85/85)
  • pre-commit native workspace check and 63 script tests
  • 12,993-instruction pressure benchmark: Fast median regalloc 22,333 us versus Backtracking 39,275 us; Fast output 78,356 bytes versus 78,264 bytes

The full workspace native test was attempted but the pre-existing MilkIR whitebox executable remained at 100% CPU for over four minutes. ISS-414 records that blocker, so this PR is draft rather than claiming the workspace gate is green.

@Milky2018
Milky2018 marked this pull request as ready for review August 11, 2026 06:53
@Milky2018
Milky2018 changed the base branch from main to dev August 11, 2026 07:02
@Milky2018
Milky2018 merged commit 3fdb55d into dev Aug 11, 2026
2 checks passed
@Milky2018
Milky2018 deleted the milky/iss-408-regalloc2-core branch August 11, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant