Enable the ssa verifier in debug builds (#5354)
Enable regalloc2's SSA verifier in debug builds to check for any outstanding reuse of virtual registers in def constraints. As fuzzing enables debug_assertions, this will enable the SSA verifier when fuzzing as well.
This commit is contained in:
@@ -57,6 +57,11 @@ pub fn compile<B: LowerBackend + TargetIsa>(
|
||||
let _tt = timing::regalloc();
|
||||
let mut options = RegallocOptions::default();
|
||||
options.verbose_log = b.flags().regalloc_verbose_logs();
|
||||
|
||||
if cfg!(debug_assertions) {
|
||||
options.validate_ssa = true;
|
||||
}
|
||||
|
||||
regalloc2::run(&vcode, machine_env, &options)
|
||||
.map_err(|err| {
|
||||
log::error!(
|
||||
|
||||
Reference in New Issue
Block a user