rust/tests/mir-opt/gvn.references.GVN.panic-unwind.diff

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

189 lines
4.8 KiB
Diff
Raw Normal View History

2023-03-20 13:05:07 -05:00
- // MIR for `references` before GVN
+ // MIR for `references` after GVN
fn references(_1: impl Sized) -> () {
debug x => _1;
let mut _0: ();
let _2: ();
let mut _3: &impl Sized;
let _4: ();
let mut _5: &impl Sized;
let _6: ();
let mut _7: &mut impl Sized;
let _8: ();
let mut _9: &mut impl Sized;
let _10: ();
let mut _11: *const impl Sized;
let _12: ();
let mut _13: *const impl Sized;
let _14: ();
let mut _15: *mut impl Sized;
let _16: ();
let mut _17: *mut impl Sized;
2023-09-16 04:16:04 -05:00
let _18: &mut impl Sized;
let mut _20: S<&mut impl Sized>;
let mut _21: &mut impl Sized;
let _22: ();
let mut _23: &impl Sized;
let _24: ();
let mut _25: &mut impl Sized;
let _26: ();
let mut _27: *const impl Sized;
let _28: ();
let mut _29: *mut impl Sized;
scope 1 {
debug r => _18;
let _19: &mut impl Sized;
scope 2 {
debug s => _19;
}
}
2023-03-20 13:05:07 -05:00
bb0: {
StorageLive(_2);
StorageLive(_3);
_3 = &_1;
2023-09-16 04:16:04 -05:00
_2 = opaque::<&impl Sized>(move _3) -> [return: bb1, unwind: bb14];
2023-03-20 13:05:07 -05:00
}
bb1: {
StorageDead(_3);
StorageDead(_2);
StorageLive(_4);
StorageLive(_5);
_5 = &_1;
2023-09-16 04:16:04 -05:00
_4 = opaque::<&impl Sized>(move _5) -> [return: bb2, unwind: bb14];
2023-03-20 13:05:07 -05:00
}
bb2: {
StorageDead(_5);
StorageDead(_4);
StorageLive(_6);
StorageLive(_7);
_7 = &mut _1;
2023-09-16 04:16:04 -05:00
_6 = opaque::<&mut impl Sized>(move _7) -> [return: bb3, unwind: bb14];
2023-03-20 13:05:07 -05:00
}
bb3: {
StorageDead(_7);
StorageDead(_6);
StorageLive(_8);
StorageLive(_9);
_9 = &mut _1;
2023-09-16 04:16:04 -05:00
_8 = opaque::<&mut impl Sized>(move _9) -> [return: bb4, unwind: bb14];
2023-03-20 13:05:07 -05:00
}
bb4: {
StorageDead(_9);
StorageDead(_8);
StorageLive(_10);
StorageLive(_11);
_11 = &raw const _1;
2023-09-16 04:16:04 -05:00
_10 = opaque::<*const impl Sized>(move _11) -> [return: bb5, unwind: bb14];
2023-03-20 13:05:07 -05:00
}
bb5: {
StorageDead(_11);
StorageDead(_10);
StorageLive(_12);
StorageLive(_13);
_13 = &raw const _1;
2023-09-16 04:16:04 -05:00
_12 = opaque::<*const impl Sized>(move _13) -> [return: bb6, unwind: bb14];
2023-03-20 13:05:07 -05:00
}
bb6: {
StorageDead(_13);
StorageDead(_12);
StorageLive(_14);
StorageLive(_15);
_15 = &raw mut _1;
2023-09-16 04:16:04 -05:00
_14 = opaque::<*mut impl Sized>(move _15) -> [return: bb7, unwind: bb14];
2023-03-20 13:05:07 -05:00
}
bb7: {
StorageDead(_15);
StorageDead(_14);
StorageLive(_16);
StorageLive(_17);
_17 = &raw mut _1;
2023-09-16 04:16:04 -05:00
_16 = opaque::<*mut impl Sized>(move _17) -> [return: bb8, unwind: bb14];
2023-03-20 13:05:07 -05:00
}
bb8: {
StorageDead(_17);
StorageDead(_16);
2023-09-16 04:16:04 -05:00
- StorageLive(_18);
+ nop;
_18 = &mut _1;
2023-09-16 04:35:46 -05:00
StorageLive(_19);
2023-09-16 04:16:04 -05:00
StorageLive(_20);
StorageLive(_21);
- _21 = move _18;
- _20 = S::<&mut impl Sized>(move _21);
+ _21 = _18;
+ _20 = S::<&mut impl Sized>(_18);
StorageDead(_21);
2023-09-16 04:35:46 -05:00
- _19 = move (_20.0: &mut impl Sized);
+ _19 = _18;
2023-09-16 04:16:04 -05:00
StorageDead(_20);
StorageLive(_22);
StorageLive(_23);
2023-09-16 04:35:46 -05:00
- _23 = &(*_19);
+ _23 = &(*_18);
2023-09-16 04:16:04 -05:00
_22 = opaque::<&impl Sized>(move _23) -> [return: bb9, unwind: bb14];
2023-03-20 13:05:07 -05:00
}
bb9: {
2023-09-16 04:16:04 -05:00
StorageDead(_23);
StorageDead(_22);
StorageLive(_24);
StorageLive(_25);
2023-09-16 04:35:46 -05:00
- _25 = &mut (*_19);
+ _25 = &mut (*_18);
2023-09-16 04:16:04 -05:00
_24 = opaque::<&mut impl Sized>(move _25) -> [return: bb10, unwind: bb14];
}
bb10: {
StorageDead(_25);
StorageDead(_24);
StorageLive(_26);
StorageLive(_27);
2023-09-16 04:35:46 -05:00
- _27 = &raw const (*_19);
+ _27 = &raw const (*_18);
2023-09-16 04:16:04 -05:00
_26 = opaque::<*const impl Sized>(move _27) -> [return: bb11, unwind: bb14];
}
bb11: {
StorageDead(_27);
StorageDead(_26);
StorageLive(_28);
StorageLive(_29);
2023-09-16 04:35:46 -05:00
- _29 = &raw mut (*_19);
+ _29 = &raw mut (*_18);
2023-09-16 04:16:04 -05:00
_28 = opaque::<*mut impl Sized>(move _29) -> [return: bb12, unwind: bb14];
}
bb12: {
StorageDead(_29);
StorageDead(_28);
_0 = const ();
2023-09-16 04:35:46 -05:00
StorageDead(_19);
2023-09-16 04:16:04 -05:00
- StorageDead(_18);
+ nop;
drop(_1) -> [return: bb13, unwind: bb15];
}
bb13: {
2023-03-20 13:05:07 -05:00
return;
}
2023-09-16 04:16:04 -05:00
bb14 (cleanup): {
drop(_1) -> [return: bb15, unwind terminate(cleanup)];
2023-03-20 13:05:07 -05:00
}
2023-09-16 04:16:04 -05:00
bb15 (cleanup): {
2023-03-20 13:05:07 -05:00
resume;
}
}