rust/tests/mir-opt/dest-prop/simple.nrvo.DestinationPropagation.diff

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
2.7 KiB
Diff
Raw Normal View History

2020-05-24 14:37:09 -05:00
- // MIR for `nrvo` before DestinationPropagation
+ // MIR for `nrvo` after DestinationPropagation
2022-09-21 10:57:30 -05:00
fn nrvo(_1: for<'a> fn(&'a mut [u8; 1024])) -> [u8; 1024] {
2022-07-27 13:47:42 -05:00
debug init => _1; // in scope 0 at $DIR/simple.rs:+0:9: +0:13
let mut _0: [u8; 1024]; // return place in scope 0 at $DIR/simple.rs:+0:39: +0:49
let mut _2: [u8; 1024]; // in scope 0 at $DIR/simple.rs:+1:9: +1:16
let _3: (); // in scope 0 at $DIR/simple.rs:+2:5: +2:19
2022-09-21 10:57:30 -05:00
let mut _4: for<'a> fn(&'a mut [u8; 1024]); // in scope 0 at $DIR/simple.rs:+2:5: +2:9
2022-07-27 13:47:42 -05:00
let mut _5: &mut [u8; 1024]; // in scope 0 at $DIR/simple.rs:+2:10: +2:18
let mut _6: &mut [u8; 1024]; // in scope 0 at $DIR/simple.rs:+2:10: +2:18
2020-05-24 14:37:09 -05:00
scope 1 {
2022-07-27 13:47:42 -05:00
debug buf => _2; // in scope 1 at $DIR/simple.rs:+1:9: +1:16
2020-05-24 14:37:09 -05:00
}
bb0: {
2022-07-27 13:47:42 -05:00
StorageLive(_2); // scope 0 at $DIR/simple.rs:+1:9: +1:16
_2 = [const 0_u8; 1024]; // scope 0 at $DIR/simple.rs:+1:19: +1:28
StorageLive(_3); // scope 1 at $DIR/simple.rs:+2:5: +2:19
- StorageLive(_4); // scope 1 at $DIR/simple.rs:+2:5: +2:9
- _4 = _1; // scope 1 at $DIR/simple.rs:+2:5: +2:9
+ nop; // scope 1 at $DIR/simple.rs:+2:5: +2:9
+ nop; // scope 1 at $DIR/simple.rs:+2:5: +2:9
2022-07-27 13:47:42 -05:00
StorageLive(_5); // scope 1 at $DIR/simple.rs:+2:10: +2:18
StorageLive(_6); // scope 1 at $DIR/simple.rs:+2:10: +2:18
_6 = &mut _2; // scope 1 at $DIR/simple.rs:+2:10: +2:18
_5 = &mut (*_6); // scope 1 at $DIR/simple.rs:+2:10: +2:18
- _3 = move _4(move _5) -> bb1; // scope 1 at $DIR/simple.rs:+2:5: +2:19
+ _3 = move _1(move _5) -> bb1; // scope 1 at $DIR/simple.rs:+2:5: +2:19
2020-05-24 14:37:09 -05:00
}
bb1: {
2022-07-27 13:47:42 -05:00
StorageDead(_5); // scope 1 at $DIR/simple.rs:+2:18: +2:19
- StorageDead(_4); // scope 1 at $DIR/simple.rs:+2:18: +2:19
+ nop; // scope 1 at $DIR/simple.rs:+2:18: +2:19
2022-07-27 13:47:42 -05:00
StorageDead(_6); // scope 1 at $DIR/simple.rs:+2:19: +2:20
StorageDead(_3); // scope 1 at $DIR/simple.rs:+2:19: +2:20
_0 = _2; // scope 1 at $DIR/simple.rs:+3:5: +3:8
StorageDead(_2); // scope 0 at $DIR/simple.rs:+4:1: +4:2
return; // scope 0 at $DIR/simple.rs:+4:2: +4:2
2020-05-24 14:37:09 -05:00
}
}