fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1- // MIR for `reference_propagation_mut` before ReferencePropagation 2+ // MIR for `reference_propagation_mut` after ReferencePropagation 3 4 fn reference_propagation_mut(_1: &mut T, _2: &mut T) -> () { 5 debug single => _1; 6 debug multiple => _2; 7 let mut _0: (); 8 let _3: (); 9 let mut _4: usize; 10 let _7: (); 11 let mut _8: (); 12 let _9: (); 13 let mut _10: usize; 14 let mut _13: &mut usize; 15 let mut _14: &mut usize; 16 let _16: (); 17 let mut _17: (); 18 let _18: (); 19 let mut _19: usize; 20 let _23: (); 21 let mut _24: &&mut usize; 22 let _25: (); 23 let mut _26: usize; 24 let _30: (); 25 let mut _31: *mut &mut usize; 26 let _32: (); 27 let mut _33: usize; 28 let _36: (); 29 let mut _37: &mut usize; 30 let _38: (); 31 let mut _39: usize; 32 let _45: (); 33 let mut _46: &mut usize; 34 let _47: (); 35 let _48: &mut T; 36 let _50: (); 37 let mut _51: (); 38 let _52: (); 39 let _53: &mut T; 40 let mut _54: &mut T; 41 let mut _55: &mut T; 42 let _57: (); 43 let mut _58: (); 44 let _59: (); 45 let mut _60: usize; 46 let _64: (); 47 let mut _65: (); 48 let mut _66: usize; 49 let _70: (); 50 let mut _71: (); 51 scope 1 { 52 debug a => _4; 53 let _5: &mut usize; 54 scope 2 { 55 debug b => _5; 56 let _6: usize; 57 scope 3 { 58 debug c => _6; 59 } 60 } 61 } 62 scope 4 { 63 debug a => _10; 64 let mut _11: usize; 65 scope 5 { 66 debug a2 => _11; 67 let mut _12: &mut usize; 68 scope 6 { 69 debug b => _12; 70 let _15: usize; 71 scope 7 { 72 debug c => _15; 73 } 74 } 75 } 76 } 77 scope 8 { 78 debug a => _19; 79 let _20: &mut usize; 80 scope 9 { 81 debug b => _20; 82 let _21: &&mut usize; 83 scope 10 { 84 debug d => _21; 85 let _22: usize; 86 scope 11 { 87 debug c => _22; 88 } 89 } 90 } 91 } 92 scope 12 { 93 debug a => _26; 94 let mut _27: &mut usize; 95 scope 13 { 96 debug b => _27; 97 let _28: *mut &mut usize; 98 scope 14 { 99 debug d => _28; 100 let _29: usize; 101 scope 15 { 102 debug c => _29; 103 } 104 } 105 } 106 } 107 scope 16 { 108 debug a => _33; 109 let _34: &mut usize; 110 scope 17 { 111 debug b => _34; 112 let _35: usize; 113 scope 18 { 114 debug c => _35; 115 } 116 } 117 } 118 scope 19 { 119 debug a => _39; 120 let _40: &mut usize; 121 scope 20 { 122 debug b1 => _40; 123 let _41: usize; 124 scope 21 { 125 debug c => _41; 126 let _42: &mut usize; 127 scope 22 { 128 debug b2 => _42; 129 let _43: usize; 130 scope 23 { 131 debug c2 => _43; 132 let _44: &mut usize; 133 scope 24 { 134 debug b3 => _44; 135 } 136 } 137 } 138 } 139 } 140 } 141 scope 25 { 142- debug a => _48; 143+ debug a => _1; 144 let _49: T; 145 scope 26 { 146 debug b => _49; 147 } 148 } 149 scope 27 { 150 debug a => _53; 151 let _56: T; 152 scope 28 { 153 debug b => _56; 154 } 155 } 156 scope 29 { 157 debug a => _60; 158 let _61: &mut usize; 159 scope 30 { 160 debug b => _61; 161 let _62: &&mut usize; 162 scope 31 { 163 debug d => _62; 164 let _63: usize; 165 scope 32 { 166 debug c => _63; 167 } 168 } 169 } 170 } 171 scope 33 { 172 debug a => _66; 173 let mut _67: &mut usize; 174 scope 34 { 175 debug b => _67; 176 let _68: &mut &mut usize; 177 scope 35 { 178 debug d => _68; 179 let _69: usize; 180 scope 36 { 181 debug c => _69; 182 } 183 } 184 } 185 } 186 187 bb0: { 188- StorageLive(_3); 189 StorageLive(_4); 190 _4 = const 5_usize; 191 StorageLive(_5); 192 _5 = &mut _4; 193 StorageLive(_6); 194- _6 = (*_5); 195+ _6 = _4; 196 StorageLive(_7); 197 StorageLive(_8); 198 _8 = (); 199 _7 = opaque::<()>(move _8) -> [return: bb1, unwind continue]; 200 } 201 202 bb1: { 203 StorageDead(_8); 204 StorageDead(_7); 205- _3 = const (); 206 StorageDead(_6); 207 StorageDead(_5); 208 StorageDead(_4); 209- StorageDead(_3); 210- StorageLive(_9); 211 StorageLive(_10); 212 _10 = const 5_usize; 213 StorageLive(_11); 214 _11 = const 7_usize; 215 StorageLive(_12); 216 _12 = &mut _10; 217 StorageLive(_13); 218- StorageLive(_14); 219- _14 = &mut _11; 220- _13 = &mut (*_14); 221+ _13 = &mut _11; 222 _12 = move _13; 223 StorageDead(_13); 224- StorageDead(_14); 225 StorageLive(_15); 226 _15 = (*_12); 227 StorageLive(_16); 228 StorageLive(_17); 229 _17 = (); 230 _16 = opaque::<()>(move _17) -> [return: bb2, unwind continue]; 231 } 232 233 bb2: { 234 StorageDead(_17); 235 StorageDead(_16); 236- _9 = const (); 237 StorageDead(_15); 238 StorageDead(_12); 239 StorageDead(_11); 240 StorageDead(_10); 241- StorageDead(_9); 242- StorageLive(_18); 243 StorageLive(_19); 244 _19 = const 5_usize; 245 StorageLive(_20); 246 _20 = &mut _19; 247 StorageLive(_21); 248 _21 = &_20; 249 StorageLive(_22); 250 _22 = (*_20); 251 StorageLive(_23); 252 StorageLive(_24); 253 _24 = _21; 254 _23 = opaque::<&&mut usize>(move _24) -> [return: bb3, unwind continue]; 255 } 256 257 bb3: { 258 StorageDead(_24); 259 StorageDead(_23); 260- _18 = const (); 261 StorageDead(_22); 262 StorageDead(_21); 263 StorageDead(_20); 264 StorageDead(_19); 265- StorageDead(_18); 266- StorageLive(_25); 267 StorageLive(_26); 268 _26 = const 5_usize; 269 StorageLive(_27); 270 _27 = &mut _26; 271 StorageLive(_28); 272 _28 = &raw mut _27; 273 StorageLive(_29); 274 _29 = (*_27); 275 StorageLive(_30); 276 StorageLive(_31); 277 _31 = _28; 278 _30 = opaque::<*mut &mut usize>(move _31) -> [return: bb4, unwind continue]; 279 } 280 281 bb4: { 282 StorageDead(_31); 283 StorageDead(_30); 284- _25 = const (); 285 StorageDead(_29); 286 StorageDead(_28); 287 StorageDead(_27); 288 StorageDead(_26); 289- StorageDead(_25); 290- StorageLive(_32); 291 StorageLive(_33); 292 _33 = const 7_usize; 293 StorageLive(_34); 294 _34 = &mut _33; 295 StorageLive(_35); 296 _35 = (*_34); 297 StorageLive(_36); 298 StorageLive(_37); 299 _37 = move _34; 300 _36 = opaque::<&mut usize>(move _37) -> [return: bb5, unwind continue]; 301 } 302 303 bb5: { 304 StorageDead(_37); 305 StorageDead(_36); 306- _32 = const (); 307 StorageDead(_35); 308 StorageDead(_34); 309 StorageDead(_33); 310- StorageDead(_32); 311- StorageLive(_38); 312 StorageLive(_39); 313 _39 = const 7_usize; 314 StorageLive(_40); 315 _40 = &mut _39; 316 StorageLive(_41); 317 _41 = (*_40); 318 StorageLive(_42); 319 _42 = move _40; 320 StorageLive(_43); 321 _43 = (*_42); 322 StorageLive(_44); 323 _44 = move _42; 324 StorageLive(_45); 325 StorageLive(_46); 326 _46 = move _44; 327 _45 = opaque::<&mut usize>(move _46) -> [return: bb6, unwind continue]; 328 } 329 330 bb6: { 331 StorageDead(_46); 332 StorageDead(_45); 333- _38 = const (); 334 StorageDead(_44); 335 StorageDead(_43); 336 StorageDead(_42); 337 StorageDead(_41); 338 StorageDead(_40); 339 StorageDead(_39); 340- StorageDead(_38); 341- StorageLive(_47); 342- StorageLive(_48); 343- _48 = &mut (*_1); 344 StorageLive(_49); 345- _49 = (*_48); 346+ _49 = (*_1); 347 StorageLive(_50); 348 StorageLive(_51); 349 _51 = (); 350 _50 = opaque::<()>(move _51) -> [return: bb7, unwind continue]; 351 } 352 353 bb7: { 354 StorageDead(_51); 355 StorageDead(_50); 356- _47 = const (); 357 StorageDead(_49); 358- StorageDead(_48); 359- StorageDead(_47); 360- StorageLive(_52); 361 StorageLive(_53); 362 _53 = &mut (*_2); 363 StorageLive(_54); 364- StorageLive(_55); 365- _55 = &mut (*_1); 366- _54 = &mut (*_55); 367+ _54 = &mut (*_1); 368 _2 = move _54; 369 StorageDead(_54); 370- StorageDead(_55); 371 StorageLive(_56); 372 _56 = (*_53); 373 StorageLive(_57); 374 StorageLive(_58); 375 _58 = (); 376 _57 = opaque::<()>(move _58) -> [return: bb8, unwind continue]; 377 } 378 379 bb8: { 380 StorageDead(_58); 381 StorageDead(_57); 382- _52 = const (); 383 StorageDead(_56); 384 StorageDead(_53); 385- StorageDead(_52); 386- StorageLive(_59); 387 StorageLive(_60); 388 _60 = const 5_usize; 389 StorageLive(_61); 390 _61 = &mut _60; 391 StorageLive(_62); 392 _62 = &_61; 393 StorageLive(_63); 394 _63 = (*_61); 395 StorageLive(_64); 396 StorageLive(_65); 397 _65 = (); 398 _64 = opaque::<()>(move _65) -> [return: bb9, unwind continue]; 399 } 400 401 bb9: { 402 StorageDead(_65); 403 StorageDead(_64); 404- _59 = const (); 405 StorageDead(_63); 406 StorageDead(_62); 407 StorageDead(_61); 408 StorageDead(_60); 409- StorageDead(_59); 410 StorageLive(_66); 411 _66 = const 5_usize; 412 StorageLive(_67); 413 _67 = &mut _66; 414 StorageLive(_68); 415 _68 = &mut _67; 416 StorageLive(_69); 417 _69 = (*_67); 418 StorageLive(_70); 419 StorageLive(_71); 420 _71 = (); 421 _70 = opaque::<()>(move _71) -> [return: bb10, unwind continue]; 422 } 423 424 bb10: { 425 StorageDead(_71); 426 StorageDead(_70); 427 _0 = const (); 428 StorageDead(_69); 429 StorageDead(_68); 430 StorageDead(_67); 431 StorageDead(_66); 432 return; 433 } 434 } 435