machinst: add a linear-scan checked variant too;

This commit is contained in:
Benjamin Bouvier
2020-05-12 14:37:54 +02:00
parent 07c55fa50f
commit 5987cf5cda
2 changed files with 6 additions and 0 deletions

View File

@@ -25,11 +25,14 @@ pub(crate) fn define() -> SettingGroup {
- `experimental_linear_scan` is an experimental linear scan allocator. It may take less - `experimental_linear_scan` is an experimental linear scan allocator. It may take less
time to allocate registers, but generated code's quality may be inferior. As of time to allocate registers, but generated code's quality may be inferior. As of
2020-04-17, it is still experimental and it should not be used in production settings. 2020-04-17, it is still experimental and it should not be used in production settings.
- `experimental_linear_scan_checked` is the linear scan allocator with additional self
checks that may take some time to run, and thus these checks are disabled by default.
"#, "#,
vec![ vec![
"backtracking", "backtracking",
"backtracking_checked", "backtracking_checked",
"experimental_linear_scan", "experimental_linear_scan",
"experimental_linear_scan_checked",
], ],
); );

View File

@@ -35,6 +35,9 @@ where
settings::Regalloc::ExperimentalLinearScan => { settings::Regalloc::ExperimentalLinearScan => {
(false, Algorithm::LinearScan(Default::default())) (false, Algorithm::LinearScan(Default::default()))
} }
settings::Regalloc::ExperimentalLinearScanChecked => {
(true, Algorithm::LinearScan(Default::default()))
}
}; };
let result = { let result = {