Skip to content

Cranelift: upgrade to regalloc2 0.14.0 and use static/constant MachineEnvs.#12596

Merged
cfallin merged 6 commits intobytecodealliance:mainfrom
cfallin:regalloc2-upgrade
Feb 15, 2026
Merged

Cranelift: upgrade to regalloc2 0.14.0 and use static/constant MachineEnvs.#12596
cfallin merged 6 commits intobytecodealliance:mainfrom
cfallin:regalloc2-upgrade

Conversation

@cfallin
Copy link
Member

@cfallin cfallin commented Feb 14, 2026

This builds on the work in bytecodealliance/regalloc2#254 and removes our use of OnceLock to construct MachineEnvs for the register allocator that contain Vecs of registers, instead using PRegSets that are truly constant data.

There's a little awkwardness and refactoring to make the necessary bits const fns, and I also had to remove a few debug_asserts because the necessary Eq comparisons seem not to be supported in const fn-land, but otherwise this is pretty mechanical.

As a result of switching to the new register traversal order based on bitsets rather than lists, the register assignments changed in a large fraction of our golden test outputs, so a majority of the diff exists in those bits (kept in separate commits here).

@cfallin cfallin requested review from a team as code owners February 14, 2026 23:27
@cfallin cfallin requested review from alexcrichton and removed request for a team February 14, 2026 23:27
@cfallin cfallin enabled auto-merge February 15, 2026 00:00
@cfallin cfallin added this pull request to the merge queue Feb 15, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 15, 2026
@cfallin cfallin enabled auto-merge February 15, 2026 00:42
@cfallin cfallin added this pull request to the merge queue Feb 15, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 15, 2026
@cfallin
Copy link
Member Author

cfallin commented Feb 15, 2026

Noting for purposes of ongoing CI frustration: DNS failure consistent over 4 retries when downloading the Rust toolchain in this job; retrying merge.

@cfallin cfallin added this pull request to the merge queue Feb 15, 2026
Merged via the queue into bytecodealliance:main with commit df57990 Feb 15, 2026
45 checks passed
@cfallin cfallin deleted the regalloc2-upgrade branch February 15, 2026 02:14
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.

2 participants