#allocator #backtracking #move #register #port #ssa

regalloc2

Backtracking register allocator inspired from IonMonkey

20 releases (6 breaking)

0.6.1 Feb 16, 2023
0.5.1 Dec 6, 2022
0.5.0 Nov 29, 2022
0.3.1 Jul 20, 2022
0.0.0 Dec 3, 2021

#35 in Memory management

Download history 37177/week @ 2022-12-08 38515/week @ 2022-12-15 25885/week @ 2022-12-22 26540/week @ 2022-12-29 40987/week @ 2023-01-05 41850/week @ 2023-01-12 46262/week @ 2023-01-19 46272/week @ 2023-01-26 44419/week @ 2023-02-02 49130/week @ 2023-02-09 51427/week @ 2023-02-16 55921/week @ 2023-02-23 51081/week @ 2023-03-02 54696/week @ 2023-03-09 54036/week @ 2023-03-16 52778/week @ 2023-03-23

223,016 downloads per month
Used in 130 crates (2 directly)

Apache-2.0 WITH LLVM-exception

400KB
7.5K SLoC

regalloc2: another register allocator

This is a register allocator that started life as, and is about 50% still, a port of IonMonkey's backtracking register allocator to Rust. In many regards, it has been generalized, optimized, and improved since the initial port, and now supports both SSA and non-SSA use-cases. (However, non-SSA should be considered deprecated; we want to move to SSA-only in the future, to enable some performance improvements. See #4.)

In addition, it contains substantial amounts of testing infrastructure (fuzzing harnesses and checkers) that does not exist in the original IonMonkey allocator.

See the design overview for (much!) more detail on how the allocator works.

License

This crate is licensed under the Apache 2.0 License with LLVM Exception. This license text can be found in the file LICENSE.

Parts of the code are derived from regalloc.rs: in particular, src/checker.rs and src/domtree.rs. This crate has the same license as regalloc.rs, so the license on these files does not differ.

Dependencies

~310–730KB
~15K SLoC