Cranelift: upgrade to regalloc2 0.14.0 and use static/constant MachineEnvs.#12596
Merged
cfallin merged 6 commits intobytecodealliance:mainfrom Feb 15, 2026
Merged
Cranelift: upgrade to regalloc2 0.14.0 and use static/constant MachineEnvs.#12596cfallin merged 6 commits intobytecodealliance:mainfrom
MachineEnvs.#12596cfallin merged 6 commits intobytecodealliance:mainfrom
Conversation
alexcrichton
approved these changes
Feb 14, 2026
e19bac4 to
cd7b637
Compare
Member
Author
|
Noting for purposes of ongoing CI frustration: DNS failure consistent over 4 retries when downloading the Rust toolchain in this job; retrying merge. |
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.
This builds on the work in bytecodealliance/regalloc2#254 and removes our use of
OnceLockto constructMachineEnvs for the register allocator that containVecs of registers, instead usingPRegSets 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 fewdebug_asserts because the necessaryEqcomparisons seem not to be supported inconst 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).