mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
5d9f5145ac
Instead of storing an extra array for discriminant values, create an allocation there and store those in an allocation immediately.
55 lines
3.6 KiB
Diff
55 lines
3.6 KiB
Diff
- // MIR for `unin` before EnumSizeOpt
|
|
+ // MIR for `unin` after EnumSizeOpt
|
|
|
|
fn unin() -> () {
|
|
let mut _0: (); // return place in scope 0 at $DIR/enum_opt.rs:43:15: 43:15
|
|
let mut _1: NoData; // in scope 0 at $DIR/enum_opt.rs:44:7: 44:12
|
|
let mut _2: NoData; // in scope 0 at $DIR/enum_opt.rs:45:7: 45:31
|
|
let mut _3: [u64; 1024]; // in scope 0 at $DIR/enum_opt.rs:45:21: 45:30
|
|
+ let mut _4: [usize; 2]; // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ let mut _5: isize; // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ let mut _6: usize; // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ let mut _7: usize; // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ let mut _8: *mut NoData; // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ let mut _9: *mut u8; // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ let mut _10: *const NoData; // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ let mut _11: *const u8; // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
|
|
scope 1 {
|
|
debug a => _1; // in scope 1 at $DIR/enum_opt.rs:44:7: 44:12
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_1); // scope 0 at $DIR/enum_opt.rs:44:7: 44:12
|
|
Deinit(_1); // scope 0 at $DIR/enum_opt.rs:44:15: 44:27
|
|
discriminant(_1) = 0; // scope 0 at $DIR/enum_opt.rs:44:15: 44:27
|
|
StorageLive(_2); // scope 1 at $DIR/enum_opt.rs:45:7: 45:31
|
|
StorageLive(_3); // scope 1 at $DIR/enum_opt.rs:45:21: 45:30
|
|
_3 = [const 1_u64; 1024]; // scope 1 at $DIR/enum_opt.rs:45:21: 45:30
|
|
Deinit(_2); // scope 1 at $DIR/enum_opt.rs:45:7: 45:31
|
|
((_2 as Large).0: [u64; 1024]) = move _3; // scope 1 at $DIR/enum_opt.rs:45:7: 45:31
|
|
discriminant(_2) = 1; // scope 1 at $DIR/enum_opt.rs:45:7: 45:31
|
|
StorageDead(_3); // scope 1 at $DIR/enum_opt.rs:45:30: 45:31
|
|
- _1 = move _2; // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ StorageLive(_4); // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ _4 = const [8_usize, 8200_usize]; // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ _5 = discriminant(_2); // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ _6 = _5 as usize (Misc); // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ _7 = _4[_6]; // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ _8 = &raw mut _1; // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ _9 = _8 as *mut u8 (Misc); // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ _10 = &raw const _2; // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ _11 = _10 as *const u8 (Misc); // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ copy_nonoverlapping(src=_11, dst=_9, count=_7); // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
|
|
+ StorageDead(_4); // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
|
|
StorageDead(_2); // scope 1 at $DIR/enum_opt.rs:45:30: 45:31
|
|
_0 = const (); // scope 0 at $DIR/enum_opt.rs:43:15: 46:2
|
|
StorageDead(_1); // scope 0 at $DIR/enum_opt.rs:46:1: 46:2
|
|
return; // scope 0 at $DIR/enum_opt.rs:46:2: 46:2
|
|
}
|
|
|
|
bb1 (cleanup): {
|
|
resume; // scope 0 at $DIR/enum_opt.rs:43:1: 46:2
|
|
}
|
|
}
|
|
|