#allocator #backtracking #register #port

regalloc2

Backtracking register allocator inspired from IonMonkey

13 unstable releases (3 breaking)

0.3.2 Aug 3, 2022
0.3.1 Jul 20, 2022
0.3.0 Jun 27, 2022
0.0.1 Mar 29, 2022
0.0.0 Dec 3, 2021
Download history 1863/week @ 2022-04-22 1791/week @ 2022-04-29 1652/week @ 2022-05-06 1463/week @ 2022-05-13 5135/week @ 2022-05-20 5736/week @ 2022-05-27 6810/week @ 2022-06-03 9246/week @ 2022-06-10 11390/week @ 2022-06-17 18664/week @ 2022-06-24 17285/week @ 2022-07-01 19947/week @ 2022-07-08 26092/week @ 2022-07-15 27576/week @ 2022-07-22 31298/week @ 2022-07-29 27124/week @ 2022-08-05

117,234 downloads per month
Used in 24 crates (via cranelift-codegen)

Apache-2.0 WITH LLVM-exception

420KB
8K 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.

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

~315–670KB
~14K SLoC