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

@@ -4,6 +4,7 @@ use crate::ir::Function;
use crate::isa::TargetIsa;
use crate::machinst::*;
use crate::timing;
use crate::trace;
use regalloc2::RegallocOptions;
use regalloc2::{self, MachineEnv};
@@ -27,7 +28,7 @@ pub fn compile<B: LowerBackend + TargetIsa>(
lower.lower(b)?
};
log::trace!("vcode from lowering: \n{:?}", vcode);
trace!("vcode from lowering: \n{:?}", vcode);
// Perform register allocation.
let regalloc_result = {