diff --git a/cranelift/codegen/meta/src/shared/settings.rs b/cranelift/codegen/meta/src/shared/settings.rs index becfbd2451..3d15387896 100644 --- a/cranelift/codegen/meta/src/shared/settings.rs +++ b/cranelift/codegen/meta/src/shared/settings.rs @@ -25,11 +25,14 @@ pub(crate) fn define() -> SettingGroup { - `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 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![ "backtracking", "backtracking_checked", "experimental_linear_scan", + "experimental_linear_scan_checked", ], ); diff --git a/cranelift/codegen/src/machinst/compile.rs b/cranelift/codegen/src/machinst/compile.rs index 959f92c316..8f81320fd3 100644 --- a/cranelift/codegen/src/machinst/compile.rs +++ b/cranelift/codegen/src/machinst/compile.rs @@ -35,6 +35,9 @@ where settings::Regalloc::ExperimentalLinearScan => { (false, Algorithm::LinearScan(Default::default())) } + settings::Regalloc::ExperimentalLinearScanChecked => { + (true, Algorithm::LinearScan(Default::default())) + } }; let result = {