New register allocator designed as a successor to regalloc2
Rust
70
97 commits
updated Aug 20, 2026
New register allocator implementation designed as a successor to regalloc2. The design takes inspiration from many sources, including LLVM's greedy register allocator.
New API-level features compared to regalloc2:
S0 / S1 / D0 on AArch32).CASP register pairs on AArch64, LD4 SIMD vector loads on AArch64).RegInfo trait.Function and RegInfo implementations.Refer to the extensive design document for more detail on the internal implementation of the allocator.
This crate has the following Cargo features:
parse: Support for parsing a GenericFunction from a text representation. Requires std.serde: Support for serializing and de-serializing all public types.arbitrary: Support for generating randomized functions for testing.trace-log: Enables detailed logging which can be somewhat expensive and very verbose.Regalloc3 includes many utlities for debugging issues related to register allocation. The very first thing that you should do if you encounter any issues is to check that your Function and RegInfo implementations both pass the validation functions under the debug_utils module.
If this doesn't solve your issues then you can dump these to a text format using DisplayRegInfo and DisplayFunction which can then be passed to regalloc3-tool for further debugging.
Licensed under either of:
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Rust
100.0%
New register allocator designed as a successor to regalloc2
Rust
70
97 commits
updated Aug 20, 2026
New register allocator implementation designed as a successor to regalloc2. The design takes inspiration from many sources, including LLVM's greedy register allocator.
New API-level features compared to regalloc2:
S0 / S1 / D0 on AArch32).CASP register pairs on AArch64, LD4 SIMD vector loads on AArch64).RegInfo trait.Function and RegInfo implementations.Refer to the extensive design document for more detail on the internal implementation of the allocator.
This crate has the following Cargo features:
parse: Support for parsing a GenericFunction from a text representation. Requires std.serde: Support for serializing and de-serializing all public types.arbitrary: Support for generating randomized functions for testing.trace-log: Enables detailed logging which can be somewhat expensive and very verbose.Regalloc3 includes many utlities for debugging issues related to register allocation. The very first thing that you should do if you encounter any issues is to check that your Function and RegInfo implementations both pass the validation functions under the debug_utils module.
If this doesn't solve your issues then you can dump these to a text format using DisplayRegInfo and DisplayFunction which can then be passed to regalloc3-tool for further debugging.
Licensed under either of:
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Rust
100.0%