@@ -9,7 +9,7 @@ use rustc_middle::mir::{self, ConstValue};
99use rustc_middle:: ty:: Ty ;
1010use rustc_middle:: ty:: layout:: { LayoutOf , TyAndLayout } ;
1111use rustc_middle:: { bug, span_bug} ;
12- use tracing:: debug;
12+ use tracing:: { debug, instrument } ;
1313
1414use super :: place:: { PlaceRef , PlaceValue } ;
1515use super :: { FunctionCx , LocalRef } ;
@@ -557,13 +557,12 @@ impl<'a, 'tcx, V: CodegenObject> OperandValue<V> {
557557}
558558
559559impl < ' a , ' tcx , Bx : BuilderMethods < ' a , ' tcx > > FunctionCx < ' a , ' tcx , Bx > {
560+ #[ instrument( level = "debug" , skip( self , bx) , ret) ]
560561 fn maybe_codegen_consume_direct (
561562 & mut self ,
562563 bx : & mut Bx ,
563564 place_ref : mir:: PlaceRef < ' tcx > ,
564565 ) -> Option < OperandRef < ' tcx , Bx :: Value > > {
565- debug ! ( "maybe_codegen_consume_direct(place_ref={:?})" , place_ref) ;
566-
567566 match self . locals [ place_ref. local ] {
568567 LocalRef :: Operand ( mut o) => {
569568 // Moves out of scalar and scalar pair fields are trivial.
@@ -606,13 +605,12 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
606605 }
607606 }
608607
608+ #[ instrument( level = "debug" , skip( self , bx) , ret) ]
609609 pub fn codegen_consume (
610610 & mut self ,
611611 bx : & mut Bx ,
612612 place_ref : mir:: PlaceRef < ' tcx > ,
613613 ) -> OperandRef < ' tcx , Bx :: Value > {
614- debug ! ( "codegen_consume(place_ref={:?})" , place_ref) ;
615-
616614 let ty = self . monomorphized_place_ty ( place_ref) ;
617615 let layout = bx. cx ( ) . layout_of ( ty) ;
618616
@@ -631,13 +629,12 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
631629 bx. load_operand ( place)
632630 }
633631
632+ #[ instrument( level = "debug" , skip( self , bx) , ret) ]
634633 pub fn codegen_operand (
635634 & mut self ,
636635 bx : & mut Bx ,
637636 operand : & mir:: Operand < ' tcx > ,
638637 ) -> OperandRef < ' tcx , Bx :: Value > {
639- debug ! ( "codegen_operand(operand={:?})" , operand) ;
640-
641638 match * operand {
642639 mir:: Operand :: Copy ( ref place) | mir:: Operand :: Move ( ref place) => {
643640 self . codegen_consume ( bx, place. as_ref ( ) )
0 commit comments