rust/tests/mir-opt/reference_prop.reference_propagation_mut.ReferencePropagation.diff
2024-08-18 16:07:33 -07:00

436 lines
11 KiB
Diff

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