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