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