fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1- // MIR for `bar` before CopyPropagation 2+ // MIR for `bar` after CopyPropagation 3 4 fn bar(_1: u8) -> () { 5 debug x => _1; // in scope 0 at $DIR/copy_propagation_arg.rs:15:8: 15:13 6 let mut _0: (); // return place in scope 0 at $DIR/copy_propagation_arg.rs:15:19: 15:19 7 let _2: u8; // in scope 0 at $DIR/copy_propagation_arg.rs:16:5: 16:13 8 let mut _3: u8; // in scope 0 at $DIR/copy_propagation_arg.rs:16:11: 16:12 9 10 bb0: { 11 StorageLive(_2); // bb0[0]: scope 0 at $DIR/copy_propagation_arg.rs:16:5: 16:13 12 StorageLive(_3); // bb0[1]: scope 0 at $DIR/copy_propagation_arg.rs:16:11: 16:12 13 _3 = _1; // bb0[2]: scope 0 at $DIR/copy_propagation_arg.rs:16:11: 16:12 14 _2 = const dummy(move _3) -> bb1; // bb0[3]: scope 0 at $DIR/copy_propagation_arg.rs:16:5: 16:13 15 // ty::Const 16 // + ty: fn(u8) -> u8 {dummy} 17 // + val: Value(Scalar(<ZST>)) 18 // mir::Constant 19 // + span: $DIR/copy_propagation_arg.rs:16:5: 16:10 20 // + literal: Const { ty: fn(u8) -> u8 {dummy}, val: Value(Scalar(<ZST>)) } 21 } 22 23 bb1: { 24 StorageDead(_3); // bb1[0]: scope 0 at $DIR/copy_propagation_arg.rs:16:12: 16:13 25 StorageDead(_2); // bb1[1]: scope 0 at $DIR/copy_propagation_arg.rs:16:13: 16:14 26 _1 = const 5u8; // bb1[2]: scope 0 at $DIR/copy_propagation_arg.rs:17:5: 17:10 27 // ty::Const 28 // + ty: u8 29 // + val: Value(Scalar(0x05)) 30 // mir::Constant 31 // + span: $DIR/copy_propagation_arg.rs:17:5: 17:10 32 // + literal: Const { ty: u8, val: Value(Scalar(0x05)) } 33 _0 = const (); // bb1[3]: scope 0 at $DIR/copy_propagation_arg.rs:15:19: 18:2 34 // ty::Const 35 // + ty: () 36 // + val: Value(Scalar(<ZST>)) 37 // mir::Constant 38 // + span: $DIR/copy_propagation_arg.rs:15:19: 18:2 39 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) } 40 return; // bb1[4]: scope 0 at $DIR/copy_propagation_arg.rs:18:2: 18:2 41 } 42 } 43