SmallVec<VRegIndex> in SpillSet (#100)
* Use maximum inline capacity available for `SmallVec<VRegIndex>` in `SpillSet` We were using 2, which is the maximum for 32-bit architectures, but on 64-bit architectures we can get 4 inline elements without growing the size of the `SmallVec`. This is a statistically significant speed up, but is so small that our formatting of floats truncates it (so less than 1%). ``` compilation :: instructions-retired :: benchmarks/bz2/benchmark.wasm Δ = 3360297.85 ± 40136.18 (confidence = 99%) more-inline-capacity.so is 1.00x to 1.00x faster than main.so! [945563401 945906690.73 946043245] main.so [942192473 942546392.88 942729104] more-inline-capacity.so compilation :: instructions-retired :: benchmarks/pulldown-cmark/benchmark.wasm Δ = 1780540.13 ± 39362.84 (confidence = 99%) more-inline-capacity.so is 1.00x to 1.00x faster than main.so! [1544990595 1545359408.41 1545626251] main.so [1543269057 1543578868.28 1543851201] more-inline-capacity.so compilation :: instructions-retired :: benchmarks/spidermonkey/benchmark.wasm Δ = 36577153.54 ± 243753.54 (confidence = 99%) more-inline-capacity.so is 1.00x to 1.00x faster than main.so! [33956158997 33957780594.50 33959538220] main.so [33919762415 33921203440.96 33923023358] more-inline-capacity.so ``` * Use a `const fn` to calculate number of inline elements
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.