Switch Cranelift over to regalloc2. (#3989)
This PR switches Cranelift over to the new register allocator, regalloc2. See [this document](https://gist.github.com/cfallin/08553421a91f150254fe878f67301801) for a summary of the design changes. This switchover has implications for core VCode/MachInst types and the lowering pass. Overall, this change brings improvements to both compile time and speed of generated code (runtime), as reported in #3942: ``` Benchmark Compilation (wallclock) Execution (wallclock) blake3-scalar 25% faster 28% faster blake3-simd no diff no diff meshoptimizer 19% faster 17% faster pulldown-cmark 17% faster no diff bz2 15% faster no diff SpiderMonkey, 21% faster 2% faster fib(30) clang.wasm 42% faster N/A ```
This commit is contained in:
@@ -23,7 +23,7 @@ serde = { version = "1.0.94", features = ["derive"], optional = true }
|
||||
bincode = { version = "1.2.1", optional = true }
|
||||
gimli = { version = "0.26.0", default-features = false, features = ["write"], optional = true }
|
||||
smallvec = { version = "1.6.1" }
|
||||
regalloc = "0.0.34"
|
||||
regalloc2 = { version = "0.1.1", features = ["checker"] }
|
||||
souper-ir = { version = "2.1.0", optional = true }
|
||||
# It is a goal of the cranelift-codegen crate to have minimal external dependencies.
|
||||
# Please don't add any unless they are essential to the task of creating binary
|
||||
@@ -77,14 +77,10 @@ all-arch = [
|
||||
# For dependent crates that want to serialize some parts of cranelift
|
||||
enable-serde = [
|
||||
"serde",
|
||||
"regalloc/enable-serde",
|
||||
"cranelift-entity/enable-serde",
|
||||
"regalloc2/enable-serde",
|
||||
]
|
||||
|
||||
# Allow snapshotting regalloc test cases. Useful only to report bad register
|
||||
# allocation failures, or for regalloc.rs developers.
|
||||
regalloc-snapshot = ["bincode", "regalloc/enable-serde"]
|
||||
|
||||
# Enable support for the Souper harvester.
|
||||
souper-harvest = ["souper-ir", "souper-ir/stringify"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user