@@ -59,7 +59,7 @@ pub fn run(func: &mut FunctionBody, cfg: &CFGInfo) {
5959 }
6060
6161 while let Some ( block) = workqueue. pop_front ( ) {
62- log:: trace!( "processing {}" , block ) ;
62+ log:: trace!( "processing {block}" ) ;
6363 workqueue_set. remove ( & block) ;
6464
6565 for & inst in & func. blocks [ block] . insts {
@@ -75,7 +75,7 @@ pub fn run(func: &mut FunctionBody, cfg: &CFGInfo) {
7575
7676 ValueDef :: Operator ( op, args, tys) if tys. len ( ) == 1 => {
7777 let args = & func. arg_pool [ * args] ;
78- log:: trace!( " -> args = {:?}" , args ) ;
78+ log:: trace!( " -> args = {args :?}" ) ;
7979
8080 match op {
8181 Operator :: I32Const { value } => {
@@ -231,10 +231,7 @@ pub fn run(func: &mut FunctionBody, cfg: &CFGInfo) {
231231 offset_base_const. insert ( value, k) ;
232232 offset_base. insert ( value, add) ;
233233 log:: trace!(
234- "created common base {} (and const {}) associated with offset-from value {}" ,
235- k,
236- add,
237- value
234+ "created common base {k} (and const {add}) associated with offset-from value {value}"
238235 ) ;
239236 } else {
240237 offset_base. insert ( value, value) ;
@@ -244,7 +241,7 @@ pub fn run(func: &mut FunctionBody, cfg: &CFGInfo) {
244241 // Now, for each value that's an Offset, rewrite it to an add
245242 // instruction.
246243 for ( block, block_def) in func. blocks . entries_mut ( ) {
247- log:: trace!( "rewriting in block {}" , block ) ;
244+ log:: trace!( "rewriting in block {block}" ) ;
248245 let mut computed_offsets: FxHashMap < AbsValue , Value > = FxHashMap :: default ( ) ;
249246 let mut new_insts = vec ! [ ] ;
250247
@@ -265,13 +262,13 @@ pub fn run(func: &mut FunctionBody, cfg: &CFGInfo) {
265262 let args = & func. arg_pool [ * args] ;
266263 let tys = * tys;
267264 let addr = args[ 0 ] ;
268- log:: trace!( "load/store with addr {}" , addr ) ;
265+ log:: trace!( "load/store with addr {addr}" ) ;
269266 if let AbsValue :: Offset ( base, this_offset) = values[ addr] {
270- log:: trace!( "inst {} is a load/store with addr that is offset from base {}; pushing offset into instruction" , inst , base ) ;
267+ log:: trace!( "inst {inst } is a load/store with addr that is offset from base {base }; pushing offset into instruction" ) ;
271268 // Update the offset embedded in the Operator
272269 // and use the `base` value instead as the
273270 // address arg.
274- let mut op = op . clone ( ) ;
271+ let mut op = * op ;
275272 let mut args = args. iter ( ) . cloned ( ) . collect :: < Vec < _ > > ( ) ;
276273 let common_base = * offset_base. get ( & base) . unwrap ( ) ;
277274 let offset = * min_offset_from. get ( & base) . unwrap ( ) ;
@@ -326,12 +323,12 @@ pub fn run(func: &mut FunctionBody, cfg: &CFGInfo) {
326323 let add = func. values . push ( ValueDef :: Operator ( op, args, i32_ty) ) ;
327324 func. source_locs [ k] = func. source_locs [ inst] ;
328325 func. source_locs [ add] = func. source_locs [ inst] ;
329- log:: trace!( " -> recomputed as {}" , add ) ;
326+ log:: trace!( " -> recomputed as {add}" ) ;
330327 new_insts. push ( add) ;
331328 add
332329 }
333330 } ) ;
334- log:: trace!( " -> rewrite to {}" , computed_offset ) ;
331+ log:: trace!( " -> rewrite to {computed_offset}" ) ;
335332 func. values [ inst] = ValueDef :: Alias ( computed_offset) ;
336333 } else {
337334 new_insts. push ( inst) ;
0 commit comments