1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
|
// MIR for `main` after SimplifyCfg-pre-optimizations
fn main() -> () {
let mut _0: ();
let mut _1: i32;
let _2: ();
let mut _4: &Test;
let _5: Test;
let mut _6: &mut i32;
let mut _7: &mut i32;
let mut _9: &mut i32;
let mut _12: *mut i32;
let mut _14: {closure@main::{closure#0}};
let mut _16: for<'a> fn(&'a i32) -> &'a i32;
let mut _17: &i32;
let _18: &i32;
let _19: &i32;
let mut _20: &Test;
let _21: Test;
let mut _22: &i32;
let _23: &i32;
let _24: i32;
let mut _26: *const i32;
let _27: ();
scope 1 {
debug x => _1;
let _3: &mut i32;
let _13: for<'a> fn(&'a i32) -> &'a i32;
scope 2 {
debug v => _3;
let _8: &mut i32;
scope 3 {
debug w => _8;
let _10: &mut i32;
scope 4 {
debug w => _10;
let _11: *mut i32;
scope 5 {
debug _w => _11;
}
}
}
}
scope 6 {
debug c => _13;
let _15: &i32;
scope 7 {
debug _w => _15;
let _25: *const i32;
let mut _28: &i32;
scope 8 {
debug _w => _25;
}
}
}
}
bb0: {
StorageLive(_1);
_1 = const 0_i32;
StorageLive(_2);
StorageLive(_3);
StorageLive(_4);
StorageLive(_5);
_5 = Test(const 0_i32);
_4 = &_5;
StorageLive(_6);
StorageLive(_7);
_7 = &mut _1;
_6 = &mut (*_7);
_3 = Test::foo(move _4, move _6) -> [return: bb1, unwind: bb8];
}
bb1: {
Retag(_3);
StorageDead(_6);
StorageDead(_4);
StorageDead(_7);
drop(_5) -> [return: bb2, unwind: bb9];
}
bb2: {
StorageDead(_5);
StorageLive(_8);
StorageLive(_9);
_9 = move _3;
Retag(_9);
_8 = &mut (*_9);
StorageDead(_9);
StorageLive(_10);
_10 = move _8;
Retag(_10);
StorageLive(_11);
StorageLive(_12);
_12 = &raw mut (*_10);
_11 = copy _12;
StorageDead(_12);
_2 = const ();
StorageDead(_11);
StorageDead(_10);
StorageDead(_8);
StorageDead(_3);
StorageDead(_2);
StorageLive(_13);
StorageLive(_14);
_14 = {closure@main::{closure#0}};
Retag(_14);
_13 = move _14 as for<'a> fn(&'a i32) -> &'a i32 (PointerCoercion(ClosureFnPointer(Safe), Implicit));
StorageDead(_14);
StorageLive(_15);
StorageLive(_16);
_16 = copy _13;
StorageLive(_17);
StorageLive(_18);
_18 = &_1;
_17 = &(*_18);
_15 = move _16(move _17) -> [return: bb3, unwind continue];
}
bb3: {
Retag(_15);
StorageDead(_17);
StorageDead(_16);
StorageDead(_18);
StorageLive(_19);
StorageLive(_20);
StorageLive(_21);
_21 = Test(const 0_i32);
_20 = &_21;
StorageLive(_22);
StorageLive(_23);
_28 = const main::promoted[0];
Retag(_28);
_23 = &(*_28);
_22 = &(*_23);
_19 = Test::foo_shr(move _20, move _22) -> [return: bb4, unwind: bb7];
}
bb4: {
Retag(_19);
StorageDead(_22);
StorageDead(_20);
StorageDead(_23);
drop(_21) -> [return: bb5, unwind: bb9];
}
bb5: {
StorageDead(_21);
StorageDead(_19);
StorageLive(_25);
StorageLive(_26);
_26 = &raw const (*_15);
_25 = copy _26;
StorageDead(_26);
StorageLive(_27);
_27 = array_casts() -> [return: bb6, unwind continue];
}
bb6: {
StorageDead(_27);
_0 = const ();
StorageDead(_25);
StorageDead(_15);
StorageDead(_13);
StorageDead(_1);
return;
}
bb7 (cleanup): {
drop(_21) -> [return: bb9, unwind terminate(cleanup)];
}
bb8 (cleanup): {
drop(_5) -> [return: bb9, unwind terminate(cleanup)];
}
bb9 (cleanup): {
resume;
}
}
|