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 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272
|
- // MIR for `complicated_match` after SimplifyCfg-initial
+ // MIR for `complicated_match` after ElaborateDrops
fn complicated_match(_1: bool, _2: (bool, bool, String)) -> i32 {
debug cond => _1;
debug items => _2;
let mut _0: i32;
let mut _3: &bool;
let mut _4: &bool;
let _5: bool;
let _6: &bool;
let _7: std::string::String;
let _8: &std::string::String;
let mut _9: bool;
let mut _10: bool;
let mut _11: !;
let mut _12: bool;
let mut _13: bool;
let mut _14: !;
let _15: bool;
let _16: std::string::String;
scope 1 {
debug a => _5;
debug a => _6;
debug s => _7;
debug s => _8;
}
scope 2 {
debug b => _15;
debug t => _16;
}
bb0: {
PlaceMention(_2);
- switchInt((_2.0: bool)) -> [0: bb6, otherwise: bb1];
+ switchInt((_2.0: bool)) -> [0: bb5, otherwise: bb1];
}
bb1: {
- switchInt((_2.1: bool)) -> [0: bb5, otherwise: bb2];
+ switchInt((_2.1: bool)) -> [0: bb10, otherwise: bb2];
}
bb2: {
- switchInt((_2.0: bool)) -> [0: bb4, otherwise: bb3];
+ switchInt((_2.0: bool)) -> [0: bb3, otherwise: bb17];
}
bb3: {
- falseEdge -> [real: bb20, imaginary: bb4];
- }
-
- bb4: {
StorageLive(_15);
_15 = (_2.1: bool);
StorageLive(_16);
_16 = move (_2.2: std::string::String);
- goto -> bb19;
+ goto -> bb16;
}
- bb5: {
- falseEdge -> [real: bb13, imaginary: bb3];
- }
-
- bb6: {
- falseEdge -> [real: bb8, imaginary: bb5];
- }
-
- bb7: {
+ bb4: {
_0 = const 1_i32;
- drop(_7) -> [return: bb18, unwind: bb25];
+ drop(_7) -> [return: bb15, unwind: bb22];
}
- bb8: {
+ bb5: {
StorageLive(_6);
_6 = &(_2.1: bool);
StorageLive(_8);
_8 = &(_2.2: std::string::String);
- _3 = &fake (_2.0: bool);
- _4 = &fake (_2.1: bool);
StorageLive(_9);
StorageLive(_10);
_10 = _1;
- switchInt(move _10) -> [0: bb10, otherwise: bb9];
+ switchInt(move _10) -> [0: bb7, otherwise: bb6];
}
- bb9: {
+ bb6: {
_0 = const 3_i32;
StorageDead(_10);
StorageDead(_9);
- goto -> bb23;
+ goto -> bb20;
}
- bb10: {
+ bb7: {
_9 = (*_6);
- switchInt(move _9) -> [0: bb12, otherwise: bb11];
+ switchInt(move _9) -> [0: bb9, otherwise: bb8];
}
- bb11: {
+ bb8: {
StorageDead(_10);
StorageDead(_9);
- FakeRead(ForMatchGuard, _3);
- FakeRead(ForMatchGuard, _4);
- FakeRead(ForGuardBinding, _6);
- FakeRead(ForGuardBinding, _8);
StorageLive(_5);
_5 = (_2.1: bool);
StorageLive(_7);
_7 = move (_2.2: std::string::String);
- goto -> bb7;
+ goto -> bb4;
}
- bb12: {
+ bb9: {
StorageDead(_10);
StorageDead(_9);
StorageDead(_8);
StorageDead(_6);
- falseEdge -> [real: bb1, imaginary: bb5];
+ goto -> bb1;
}
- bb13: {
+ bb10: {
StorageLive(_6);
_6 = &(_2.0: bool);
StorageLive(_8);
_8 = &(_2.2: std::string::String);
- _3 = &fake (_2.0: bool);
- _4 = &fake (_2.1: bool);
StorageLive(_12);
StorageLive(_13);
_13 = _1;
- switchInt(move _13) -> [0: bb15, otherwise: bb14];
+ switchInt(move _13) -> [0: bb12, otherwise: bb11];
}
- bb14: {
+ bb11: {
_0 = const 3_i32;
StorageDead(_13);
StorageDead(_12);
- goto -> bb23;
+ goto -> bb20;
}
- bb15: {
+ bb12: {
_12 = (*_6);
- switchInt(move _12) -> [0: bb17, otherwise: bb16];
+ switchInt(move _12) -> [0: bb14, otherwise: bb13];
}
- bb16: {
+ bb13: {
StorageDead(_13);
StorageDead(_12);
- FakeRead(ForMatchGuard, _3);
- FakeRead(ForMatchGuard, _4);
- FakeRead(ForGuardBinding, _6);
- FakeRead(ForGuardBinding, _8);
StorageLive(_5);
_5 = (_2.0: bool);
StorageLive(_7);
_7 = move (_2.2: std::string::String);
- goto -> bb7;
+ goto -> bb4;
}
- bb17: {
+ bb14: {
StorageDead(_13);
StorageDead(_12);
StorageDead(_8);
StorageDead(_6);
- falseEdge -> [real: bb2, imaginary: bb3];
+ goto -> bb2;
}
- bb18: {
+ bb15: {
StorageDead(_7);
StorageDead(_5);
StorageDead(_8);
StorageDead(_6);
- goto -> bb22;
+ goto -> bb19;
}
- bb19: {
+ bb16: {
_0 = const 2_i32;
- drop(_16) -> [return: bb21, unwind: bb25];
+ drop(_16) -> [return: bb18, unwind: bb22];
}
- bb20: {
+ bb17: {
StorageLive(_15);
_15 = (_2.1: bool);
StorageLive(_16);
_16 = move (_2.2: std::string::String);
- goto -> bb19;
+ goto -> bb16;
}
- bb21: {
+ bb18: {
StorageDead(_16);
StorageDead(_15);
- goto -> bb22;
+ goto -> bb19;
}
- bb22: {
- drop(_2) -> [return: bb24, unwind: bb26];
+ bb19: {
+ goto -> bb26;
}
- bb23: {
+ bb20: {
StorageDead(_8);
StorageDead(_6);
- drop(_2) -> [return: bb24, unwind: bb26];
+ drop(_2) -> [return: bb21, unwind: bb23];
}
- bb24: {
+ bb21: {
return;
}
- bb25 (cleanup): {
- drop(_2) -> [return: bb26, unwind terminate(cleanup)];
+ bb22 (cleanup): {
+ goto -> bb27;
}
- bb26 (cleanup): {
+ bb23 (cleanup): {
resume;
+ }
+
+ bb24: {
+ goto -> bb21;
+ }
+
+ bb25 (cleanup): {
+ goto -> bb23;
+ }
+
+ bb26: {
+ goto -> bb24;
+ }
+
+ bb27 (cleanup): {
+ goto -> bb23;
}
}
|