Update to regalloc.rs version 0.22.
This commit is contained in:
committed by
julian-seward1
parent
57fb1c69c5
commit
48521393ae
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -1525,9 +1525,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regalloc"
|
name = "regalloc"
|
||||||
version = "0.0.21"
|
version = "0.0.22"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b27b256b41986ac5141b37b8bbba85d314fbf546c182eb255af6720e07e4f804"
|
checksum = "9993953f6481fe355c490a0bdc2d488e354cd28728da36cd4156e2cfb74fd6de"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"rustc-hash",
|
"rustc-hash",
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ gimli = { version = "0.20.0", default-features = false, features = ["write"], op
|
|||||||
smallvec = { version = "1.0.0" }
|
smallvec = { version = "1.0.0" }
|
||||||
thiserror = "1.0.4"
|
thiserror = "1.0.4"
|
||||||
byteorder = { version = "1.3.2", default-features = false }
|
byteorder = { version = "1.3.2", default-features = false }
|
||||||
regalloc = "0.0.21"
|
regalloc = "0.0.22"
|
||||||
# It is a goal of the cranelift-codegen crate to have minimal external dependencies.
|
# 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
|
# Please don't add any unless they are essential to the task of creating binary
|
||||||
# machine code. Integration tests that need external dependencies can be
|
# machine code. Integration tests that need external dependencies can be
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use crate::settings;
|
|||||||
use crate::timing;
|
use crate::timing;
|
||||||
|
|
||||||
use log::debug;
|
use log::debug;
|
||||||
use regalloc::{allocate_registers, RegAllocAlgorithm};
|
use regalloc::{allocate_registers_with_opts, Algorithm, Options};
|
||||||
|
|
||||||
/// Compile the given function down to VCode with allocated registers, ready
|
/// Compile the given function down to VCode with allocated registers, ready
|
||||||
/// for binary emission.
|
/// for binary emission.
|
||||||
@@ -26,16 +26,25 @@ where
|
|||||||
debug!("vcode from lowering: \n{}", vcode.show_rru(Some(universe)));
|
debug!("vcode from lowering: \n{}", vcode.show_rru(Some(universe)));
|
||||||
|
|
||||||
// Perform register allocation.
|
// Perform register allocation.
|
||||||
let algorithm = match vcode.flags().regalloc() {
|
let (run_checker, algorithm) = match vcode.flags().regalloc() {
|
||||||
settings::Regalloc::Backtracking => RegAllocAlgorithm::Backtracking,
|
settings::Regalloc::Backtracking => (false, Algorithm::Backtracking(Default::default())),
|
||||||
settings::Regalloc::BacktrackingChecked => RegAllocAlgorithm::BacktrackingChecked,
|
settings::Regalloc::BacktrackingChecked => {
|
||||||
settings::Regalloc::ExperimentalLinearScan => RegAllocAlgorithm::LinearScan,
|
(true, Algorithm::Backtracking(Default::default()))
|
||||||
|
}
|
||||||
|
settings::Regalloc::ExperimentalLinearScan => {
|
||||||
|
(false, Algorithm::LinearScan(Default::default()))
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let result = {
|
let result = {
|
||||||
let _tt = timing::regalloc();
|
let _tt = timing::regalloc();
|
||||||
allocate_registers(
|
allocate_registers_with_opts(
|
||||||
&mut vcode, algorithm, universe, /*request_block_annotations=*/ false,
|
&mut vcode,
|
||||||
|
universe,
|
||||||
|
Options {
|
||||||
|
run_checker,
|
||||||
|
algorithm,
|
||||||
|
},
|
||||||
)
|
)
|
||||||
.map_err(|err| {
|
.map_err(|err| {
|
||||||
debug!(
|
debug!(
|
||||||
|
|||||||
Reference in New Issue
Block a user