@@ -9,7 +9,7 @@ use rustc_middle::mir::{self, ConstValue};
9
9
use rustc_middle:: ty:: Ty ;
10
10
use rustc_middle:: ty:: layout:: { LayoutOf , TyAndLayout } ;
11
11
use rustc_middle:: { bug, span_bug} ;
12
- use tracing:: debug;
12
+ use tracing:: { debug, instrument } ;
13
13
14
14
use super :: place:: { PlaceRef , PlaceValue } ;
15
15
use super :: { FunctionCx , LocalRef } ;
@@ -557,13 +557,12 @@ impl<'a, 'tcx, V: CodegenObject> OperandValue<V> {
557
557
}
558
558
559
559
impl < ' a , ' tcx , Bx : BuilderMethods < ' a , ' tcx > > FunctionCx < ' a , ' tcx , Bx > {
560
+ #[ instrument( level = "debug" , skip( self , bx) , ret) ]
560
561
fn maybe_codegen_consume_direct (
561
562
& mut self ,
562
563
bx : & mut Bx ,
563
564
place_ref : mir:: PlaceRef < ' tcx > ,
564
565
) -> Option < OperandRef < ' tcx , Bx :: Value > > {
565
- debug ! ( "maybe_codegen_consume_direct(place_ref={:?})" , place_ref) ;
566
-
567
566
match self . locals [ place_ref. local ] {
568
567
LocalRef :: Operand ( mut o) => {
569
568
// 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> {
606
605
}
607
606
}
608
607
608
+ #[ instrument( level = "debug" , skip( self , bx) , ret) ]
609
609
pub fn codegen_consume (
610
610
& mut self ,
611
611
bx : & mut Bx ,
612
612
place_ref : mir:: PlaceRef < ' tcx > ,
613
613
) -> OperandRef < ' tcx , Bx :: Value > {
614
- debug ! ( "codegen_consume(place_ref={:?})" , place_ref) ;
615
-
616
614
let ty = self . monomorphized_place_ty ( place_ref) ;
617
615
let layout = bx. cx ( ) . layout_of ( ty) ;
618
616
@@ -631,13 +629,12 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
631
629
bx. load_operand ( place)
632
630
}
633
631
632
+ #[ instrument( level = "debug" , skip( self , bx) , ret) ]
634
633
pub fn codegen_operand (
635
634
& mut self ,
636
635
bx : & mut Bx ,
637
636
operand : & mir:: Operand < ' tcx > ,
638
637
) -> OperandRef < ' tcx , Bx :: Value > {
639
- debug ! ( "codegen_operand(operand={:?})" , operand) ;
640
-
641
638
match * operand {
642
639
mir:: Operand :: Copy ( ref place) | mir:: Operand :: Move ( ref place) => {
643
640
self . codegen_consume ( bx, place. as_ref ( ) )
0 commit comments