|
| 1 | +- // MIR for `mut_raw_then_mut_shr` before ReferencePropagation |
| 2 | ++ // MIR for `mut_raw_then_mut_shr` after ReferencePropagation |
| 3 | + |
| 4 | + fn mut_raw_then_mut_shr() -> (i32, i32) { |
| 5 | + let mut _0: (i32, i32); // return place in scope 0 at $DIR/reference_prop.rs:+0:30: +0:40 |
| 6 | + let mut _1: i32; // in scope 0 at $DIR/reference_prop.rs:+1:9: +1:14 |
| 7 | + let mut _4: *mut i32; // in scope 0 at $DIR/reference_prop.rs:+3:16: +3:36 |
| 8 | + let mut _5: &mut i32; // in scope 0 at $DIR/reference_prop.rs:+3:16: +3:26 |
| 9 | + let _8: (); // in scope 0 at $DIR/reference_prop.rs:+7:5: +7:26 |
| 10 | + let mut _9: i32; // in scope 0 at $DIR/reference_prop.rs:+8:6: +8:7 |
| 11 | + let mut _10: i32; // in scope 0 at $DIR/reference_prop.rs:+8:9: +8:10 |
| 12 | + scope 1 { |
| 13 | + debug x => _1; // in scope 1 at $DIR/reference_prop.rs:+1:9: +1:14 |
| 14 | + let _2: &mut i32; // in scope 1 at $DIR/reference_prop.rs:+2:9: +2:13 |
| 15 | + scope 2 { |
| 16 | + debug xref => _2; // in scope 2 at $DIR/reference_prop.rs:+2:9: +2:13 |
| 17 | + let _3: *mut i32; // in scope 2 at $DIR/reference_prop.rs:+3:9: +3:13 |
| 18 | + scope 3 { |
| 19 | + debug xraw => _3; // in scope 3 at $DIR/reference_prop.rs:+3:9: +3:13 |
| 20 | + let _6: &i32; // in scope 3 at $DIR/reference_prop.rs:+4:9: +4:13 |
| 21 | + scope 4 { |
| 22 | + debug xshr => _6; // in scope 4 at $DIR/reference_prop.rs:+4:9: +4:13 |
| 23 | + let _7: i32; // in scope 4 at $DIR/reference_prop.rs:+6:9: +6:10 |
| 24 | + scope 5 { |
| 25 | + debug a => _7; // in scope 5 at $DIR/reference_prop.rs:+6:9: +6:10 |
| 26 | + scope 6 { |
| 27 | + } |
| 28 | + } |
| 29 | + } |
| 30 | + } |
| 31 | + } |
| 32 | + } |
| 33 | + |
| 34 | + bb0: { |
| 35 | + StorageLive(_1); // scope 0 at $DIR/reference_prop.rs:+1:9: +1:14 |
| 36 | + _1 = const 2_i32; // scope 0 at $DIR/reference_prop.rs:+1:17: +1:18 |
| 37 | +- StorageLive(_2); // scope 1 at $DIR/reference_prop.rs:+2:9: +2:13 |
| 38 | + _2 = &mut _1; // scope 1 at $DIR/reference_prop.rs:+2:16: +2:22 |
| 39 | + StorageLive(_3); // scope 2 at $DIR/reference_prop.rs:+3:9: +3:13 |
| 40 | + StorageLive(_4); // scope 2 at $DIR/reference_prop.rs:+3:16: +3:36 |
| 41 | +- StorageLive(_5); // scope 2 at $DIR/reference_prop.rs:+3:16: +3:26 |
| 42 | +- _5 = &mut (*_2); // scope 2 at $DIR/reference_prop.rs:+3:16: +3:26 |
| 43 | +- _4 = &raw mut (*_5); // scope 2 at $DIR/reference_prop.rs:+3:16: +3:26 |
| 44 | ++ _5 = &mut _1; // scope 2 at $DIR/reference_prop.rs:+3:16: +3:26 |
| 45 | ++ _4 = &raw mut (*_2); // scope 2 at $DIR/reference_prop.rs:+3:16: +3:26 |
| 46 | + _3 = _4; // scope 2 at $DIR/reference_prop.rs:+3:16: +3:36 |
| 47 | +- StorageDead(_5); // scope 2 at $DIR/reference_prop.rs:+3:36: +3:37 |
| 48 | + StorageDead(_4); // scope 2 at $DIR/reference_prop.rs:+3:36: +3:37 |
| 49 | + StorageLive(_6); // scope 3 at $DIR/reference_prop.rs:+4:9: +4:13 |
| 50 | +- _6 = &(*_2); // scope 3 at $DIR/reference_prop.rs:+4:16: +4:22 |
| 51 | ++ _6 = &_1; // scope 3 at $DIR/reference_prop.rs:+4:16: +4:22 |
| 52 | + StorageLive(_7); // scope 4 at $DIR/reference_prop.rs:+6:9: +6:10 |
| 53 | +- _7 = (*_6); // scope 4 at $DIR/reference_prop.rs:+6:13: +6:18 |
| 54 | +- StorageLive(_8); // scope 5 at $DIR/reference_prop.rs:+7:5: +7:26 |
| 55 | +- (*_3) = const 4_i32; // scope 6 at $DIR/reference_prop.rs:+7:14: +7:23 |
| 56 | +- _8 = const (); // scope 6 at $DIR/reference_prop.rs:+7:5: +7:26 |
| 57 | +- StorageDead(_8); // scope 5 at $DIR/reference_prop.rs:+7:25: +7:26 |
| 58 | ++ _7 = (*_2); // scope 4 at $DIR/reference_prop.rs:+6:13: +6:18 |
| 59 | ++ (*_5) = const 4_i32; // scope 6 at $DIR/reference_prop.rs:+7:14: +7:23 |
| 60 | + StorageLive(_9); // scope 5 at $DIR/reference_prop.rs:+8:6: +8:7 |
| 61 | + _9 = _7; // scope 5 at $DIR/reference_prop.rs:+8:6: +8:7 |
| 62 | + StorageLive(_10); // scope 5 at $DIR/reference_prop.rs:+8:9: +8:10 |
| 63 | + _10 = _1; // scope 5 at $DIR/reference_prop.rs:+8:9: +8:10 |
| 64 | + _0 = (move _9, move _10); // scope 5 at $DIR/reference_prop.rs:+8:5: +8:11 |
| 65 | + StorageDead(_10); // scope 5 at $DIR/reference_prop.rs:+8:10: +8:11 |
| 66 | + StorageDead(_9); // scope 5 at $DIR/reference_prop.rs:+8:10: +8:11 |
| 67 | + StorageDead(_7); // scope 4 at $DIR/reference_prop.rs:+9:1: +9:2 |
| 68 | + StorageDead(_6); // scope 3 at $DIR/reference_prop.rs:+9:1: +9:2 |
| 69 | + StorageDead(_3); // scope 2 at $DIR/reference_prop.rs:+9:1: +9:2 |
| 70 | +- StorageDead(_2); // scope 1 at $DIR/reference_prop.rs:+9:1: +9:2 |
| 71 | + StorageDead(_1); // scope 0 at $DIR/reference_prop.rs:+9:1: +9:2 |
| 72 | + return; // scope 0 at $DIR/reference_prop.rs:+9:2: +9:2 |
| 73 | + } |
| 74 | + } |
| 75 | + |
0 commit comments