diff --git a/src/ion/fast_alloc.rs b/src/ion/fast_alloc.rs index c5cec9a..3d6141b 100644 --- a/src/ion/fast_alloc.rs +++ b/src/ion/fast_alloc.rs @@ -445,15 +445,17 @@ fn allocate_block_insts<'a, F: Function>( state.func.is_branch(inst), alloc_idx ); - let mut str = String::new(); - for preg in clobbers { - if str.is_empty() { - str.push_str(&format!("{}", preg)); - } else { - str.push_str(&format!(", {}", preg)); + if trace_enabled!() { + let mut str = String::new(); + for preg in clobbers { + if str.is_empty() { + str.push_str(&format!("{}", preg)); + } else { + str.push_str(&format!(", {}", preg)); + } } + trace!("Clobbers: {}", str); } - trace!("Clobbers: {}", str); // keep track of which pregs where allocated so we can clear them later on // TODO: wouldnt need this if we look up the inst a vreg was allocated at