rust/tests/mir-opt/reference_prop.reference_propagation_mut.ReferencePropagation.diff

443 lines
11 KiB
Diff
Raw Normal View History

- // MIR for `reference_propagation_mut` before ReferencePropagation
+ // MIR for `reference_propagation_mut` after ReferencePropagation
fn reference_propagation_mut(_1: &mut T, _2: &mut T) -> () {
2023-06-06 08:47:00 -05:00
debug single => _1;
debug multiple => _2;
let mut _0: ();
let _3: ();
let mut _4: usize;
let _7: ();
let mut _8: ();
let _9: ();
let mut _10: usize;
let mut _13: &mut usize;
let mut _14: &mut usize;
let _16: ();
let mut _17: ();
let _18: ();
let mut _19: usize;
let _23: ();
let mut _24: &&mut usize;
let _25: ();
let mut _26: usize;
let _30: ();
let mut _31: *mut &mut usize;
let _32: ();
let mut _33: usize;
let _36: ();
let mut _37: &mut usize;
let _38: ();
let mut _39: usize;
let _45: ();
let mut _46: &mut usize;
let _47: ();
let _48: &mut T;
let _50: ();
let mut _51: ();
let _52: ();
let _53: &mut T;
let mut _54: &mut T;
let mut _55: &mut T;
let _57: ();
let mut _58: ();
let _59: ();
let mut _60: usize;
let _64: ();
let mut _65: ();
let mut _66: usize;
let _70: ();
let mut _71: ();
scope 1 {
2023-06-06 08:47:00 -05:00
debug a => _4;
let _5: &mut usize;
scope 2 {
2023-06-06 08:47:00 -05:00
- debug b => _5;
+ debug b => &_4;
let _6: usize;
scope 3 {
2023-06-06 08:47:00 -05:00
debug c => _6;
}
}
}
scope 4 {
2023-06-06 08:47:00 -05:00
debug a => _10;
let mut _11: usize;
scope 5 {
2023-06-06 08:47:00 -05:00
debug a2 => _11;
let mut _12: &mut usize;
scope 6 {
2023-06-06 08:47:00 -05:00
debug b => _12;
let _15: usize;
scope 7 {
2023-06-06 08:47:00 -05:00
debug c => _15;
}
}
}
}
scope 8 {
2023-06-06 08:47:00 -05:00
debug a => _19;
let _20: &mut usize;
scope 9 {
2023-06-06 08:47:00 -05:00
debug b => _20;
let _21: &&mut usize;
scope 10 {
2023-06-06 08:47:00 -05:00
debug d => _21;
let _22: usize;
scope 11 {
2023-06-06 08:47:00 -05:00
debug c => _22;
}
}
}
}
scope 12 {
2023-06-06 08:47:00 -05:00
debug a => _26;
let mut _27: &mut usize;
scope 13 {
2023-06-06 08:47:00 -05:00
debug b => _27;
let _28: *mut &mut usize;
scope 14 {
2023-06-06 08:47:00 -05:00
debug d => _28;
let _29: usize;
scope 15 {
2023-06-06 08:47:00 -05:00
debug c => _29;
}
}
}
}
scope 16 {
2023-06-06 08:47:00 -05:00
debug a => _33;
let _34: &mut usize;
scope 17 {
2023-06-06 08:47:00 -05:00
debug b => _34;
let _35: usize;
scope 18 {
2023-06-06 08:47:00 -05:00
debug c => _35;
}
}
}
scope 19 {
2023-06-06 08:47:00 -05:00
debug a => _39;
let _40: &mut usize;
scope 20 {
2023-06-06 08:47:00 -05:00
debug b1 => _40;
let _41: usize;
scope 21 {
2023-06-06 08:47:00 -05:00
debug c => _41;
let _42: &mut usize;
scope 22 {
2023-06-06 08:47:00 -05:00
debug b2 => _42;
let _43: usize;
scope 23 {
2023-06-06 08:47:00 -05:00
debug c2 => _43;
let _44: &mut usize;
scope 24 {
2023-06-06 08:47:00 -05:00
debug b3 => _44;
}
}
}
}
}
}
scope 25 {
2023-06-06 08:47:00 -05:00
- debug a => _48;
+ debug a => _1;
let _49: T;
scope 26 {
2023-06-06 08:47:00 -05:00
debug b => _49;
}
}
scope 27 {
2023-06-06 08:47:00 -05:00
debug a => _53;
let _56: T;
scope 28 {
2023-06-06 08:47:00 -05:00
debug b => _56;
}
}
scope 29 {
2023-06-06 08:47:00 -05:00
debug a => _60;
let _61: &mut usize;
scope 30 {
2023-06-06 08:47:00 -05:00
- debug b => _61;
+ debug b => &_60;
let _62: &&mut usize;
scope 31 {
2023-06-06 08:47:00 -05:00
- debug d => _62;
+ debug d => &&_60;
let _63: usize;
scope 32 {
2023-06-06 08:47:00 -05:00
debug c => _63;
}
}
}
}
scope 33 {
2023-06-06 08:47:00 -05:00
debug a => _66;
let mut _67: &mut usize;
scope 34 {
2023-06-06 08:47:00 -05:00
- debug b => _67;
+ debug b => &_66;
let _68: &mut &mut usize;
scope 35 {
2023-06-06 08:47:00 -05:00
- debug d => _68;
+ debug d => &&_66;
let _69: usize;
scope 36 {
2023-06-06 08:47:00 -05:00
debug c => _69;
}
}
}
}
bb0: {
2023-06-06 08:47:00 -05:00
- StorageLive(_3);
StorageLive(_4);
_4 = const 5_usize;
- StorageLive(_5);
- _5 = &mut _4;
StorageLive(_6);
- _6 = (*_5);
+ _6 = _4;
StorageLive(_7);
StorageLive(_8);
_8 = ();
2023-06-23 11:53:09 -05:00
_7 = opaque::<()>(move _8) -> [return: bb1, unwind continue];
}
bb1: {
2023-06-06 08:47:00 -05:00
StorageDead(_8);
StorageDead(_7);
- _3 = const ();
StorageDead(_6);
- StorageDead(_5);
StorageDead(_4);
- StorageDead(_3);
- StorageLive(_9);
StorageLive(_10);
_10 = const 5_usize;
StorageLive(_11);
_11 = const 7_usize;
StorageLive(_12);
_12 = &mut _10;
StorageLive(_13);
- StorageLive(_14);
- _14 = &mut _11;
- _13 = &mut (*_14);
+ _13 = &mut _11;
_12 = move _13;
StorageDead(_13);
- StorageDead(_14);
StorageLive(_15);
_15 = (*_12);
StorageLive(_16);
StorageLive(_17);
_17 = ();
2023-06-23 11:53:09 -05:00
_16 = opaque::<()>(move _17) -> [return: bb2, unwind continue];
}
bb2: {
2023-06-06 08:47:00 -05:00
StorageDead(_17);
StorageDead(_16);
- _9 = const ();
StorageDead(_15);
StorageDead(_12);
StorageDead(_11);
StorageDead(_10);
- StorageDead(_9);
- StorageLive(_18);
StorageLive(_19);
_19 = const 5_usize;
StorageLive(_20);
_20 = &mut _19;
StorageLive(_21);
_21 = &_20;
StorageLive(_22);
_22 = (*_20);
StorageLive(_23);
StorageLive(_24);
_24 = _21;
2023-06-23 11:53:09 -05:00
_23 = opaque::<&&mut usize>(move _24) -> [return: bb3, unwind continue];
2023-05-07 07:19:46 -05:00
}
bb3: {
2023-06-06 08:47:00 -05:00
StorageDead(_24);
StorageDead(_23);
- _18 = const ();
StorageDead(_22);
StorageDead(_21);
StorageDead(_20);
StorageDead(_19);
- StorageDead(_18);
- StorageLive(_25);
StorageLive(_26);
_26 = const 5_usize;
StorageLive(_27);
_27 = &mut _26;
StorageLive(_28);
_28 = &raw mut _27;
StorageLive(_29);
_29 = (*_27);
StorageLive(_30);
StorageLive(_31);
_31 = _28;
2023-06-23 11:53:09 -05:00
_30 = opaque::<*mut &mut usize>(move _31) -> [return: bb4, unwind continue];
2023-05-07 07:19:46 -05:00
}
bb4: {
2023-06-06 08:47:00 -05:00
StorageDead(_31);
StorageDead(_30);
- _25 = const ();
StorageDead(_29);
StorageDead(_28);
StorageDead(_27);
StorageDead(_26);
- StorageDead(_25);
- StorageLive(_32);
StorageLive(_33);
_33 = const 7_usize;
StorageLive(_34);
_34 = &mut _33;
StorageLive(_35);
_35 = (*_34);
StorageLive(_36);
StorageLive(_37);
_37 = move _34;
2023-06-23 11:53:09 -05:00
_36 = opaque::<&mut usize>(move _37) -> [return: bb5, unwind continue];
2023-05-07 07:19:46 -05:00
}
bb5: {
2023-06-06 08:47:00 -05:00
StorageDead(_37);
StorageDead(_36);
- _32 = const ();
StorageDead(_35);
StorageDead(_34);
StorageDead(_33);
- StorageDead(_32);
- StorageLive(_38);
StorageLive(_39);
_39 = const 7_usize;
StorageLive(_40);
_40 = &mut _39;
StorageLive(_41);
_41 = (*_40);
StorageLive(_42);
_42 = move _40;
StorageLive(_43);
_43 = (*_42);
StorageLive(_44);
_44 = move _42;
StorageLive(_45);
StorageLive(_46);
_46 = move _44;
2023-06-23 11:53:09 -05:00
_45 = opaque::<&mut usize>(move _46) -> [return: bb6, unwind continue];
2023-05-07 07:19:46 -05:00
}
bb6: {
2023-06-06 08:47:00 -05:00
StorageDead(_46);
StorageDead(_45);
- _38 = const ();
StorageDead(_44);
StorageDead(_43);
StorageDead(_42);
StorageDead(_41);
StorageDead(_40);
StorageDead(_39);
- StorageDead(_38);
- StorageLive(_47);
- StorageLive(_48);
- _48 = &mut (*_1);
StorageLive(_49);
- _49 = (*_48);
+ _49 = (*_1);
StorageLive(_50);
StorageLive(_51);
_51 = ();
2023-06-23 11:53:09 -05:00
_50 = opaque::<()>(move _51) -> [return: bb7, unwind continue];
2023-05-07 07:19:46 -05:00
}
bb7: {
2023-06-06 08:47:00 -05:00
StorageDead(_51);
StorageDead(_50);
- _47 = const ();
StorageDead(_49);
- StorageDead(_48);
- StorageDead(_47);
- StorageLive(_52);
StorageLive(_53);
_53 = &mut (*_2);
StorageLive(_54);
- StorageLive(_55);
- _55 = &mut (*_1);
- _54 = &mut (*_55);
+ _54 = &mut (*_1);
_2 = move _54;
StorageDead(_54);
- StorageDead(_55);
StorageLive(_56);
_56 = (*_53);
StorageLive(_57);
StorageLive(_58);
_58 = ();
2023-06-23 11:53:09 -05:00
_57 = opaque::<()>(move _58) -> [return: bb8, unwind continue];
2023-05-07 07:19:46 -05:00
}
bb8: {
2023-06-06 08:47:00 -05:00
StorageDead(_58);
StorageDead(_57);
- _52 = const ();
StorageDead(_56);
StorageDead(_53);
- StorageDead(_52);
- StorageLive(_59);
StorageLive(_60);
_60 = const 5_usize;
- StorageLive(_61);
- _61 = &mut _60;
- StorageLive(_62);
- _62 = &_61;
StorageLive(_63);
- _63 = (*_61);
+ _63 = _60;
StorageLive(_64);
StorageLive(_65);
_65 = ();
2023-06-23 11:53:09 -05:00
_64 = opaque::<()>(move _65) -> [return: bb9, unwind continue];
}
bb9: {
2023-06-06 08:47:00 -05:00
StorageDead(_65);
StorageDead(_64);
- _59 = const ();
StorageDead(_63);
- StorageDead(_62);
- StorageDead(_61);
StorageDead(_60);
- StorageDead(_59);
StorageLive(_66);
_66 = const 5_usize;
- StorageLive(_67);
- _67 = &mut _66;
- StorageLive(_68);
- _68 = &mut _67;
StorageLive(_69);
- _69 = (*_67);
+ _69 = _66;
StorageLive(_70);
StorageLive(_71);
_71 = ();
2023-06-23 11:53:09 -05:00
_70 = opaque::<()>(move _71) -> [return: bb10, unwind continue];
}
bb10: {
2023-06-06 08:47:00 -05:00
StorageDead(_71);
StorageDead(_70);
_0 = const ();
StorageDead(_69);
- StorageDead(_68);
- StorageDead(_67);
StorageDead(_66);
return;
}
}