cranelift: Introduce a feature to enable trace logs (#4484)

* Don't use `log::trace` directly but a feature-enabled `trace` macro
* Don't emit disassembly based on the log level
This commit is contained in:
Benjamin Bouvier
2022-08-01 11:19:15 +02:00
committed by GitHub
parent 8e9e9c52a1
commit 8d0224341c
20 changed files with 95 additions and 80 deletions

View File

@@ -7,6 +7,7 @@ use crate::isa::s390x::inst::*;
use crate::isa::s390x::settings as s390x_settings;
use crate::machinst::reg::count_operands;
use crate::machinst::{Reg, RegClass};
use crate::trace;
use core::convert::TryFrom;
use regalloc2::Allocation;
@@ -3239,7 +3240,7 @@ impl MachInstEmit for Inst {
}
&Inst::VirtualSPOffsetAdj { offset } => {
log::trace!(
trace!(
"virtual sp offset adjusted by {} -> {}",
offset,
state.virtual_sp_offset + offset