rust/tests/mir-opt/sroa/structs.flat.ScalarReplacementOfAggregates.diff

78 lines
1.9 KiB
Diff
Raw Normal View History

2023-03-05 12:06:55 -06:00
- // MIR for `flat` before ScalarReplacementOfAggregates
+ // MIR for `flat` after ScalarReplacementOfAggregates
fn flat() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let _1: u8;
let _2: ();
let _3: &str;
let _4: std::option::Option<isize>;
let mut _5: Foo;
let mut _6: ();
let mut _7: std::option::Option<isize>;
+ let mut _8: u8;
+ let mut _9: ();
+ let mut _10: &str;
+ let mut _11: std::option::Option<isize>;
2023-03-05 12:06:55 -06:00
scope 1 {
2023-06-06 08:47:00 -05:00
debug a => _1;
debug b => _2;
debug c => _3;
debug d => _4;
2023-03-05 12:06:55 -06:00
scope 2 {
scope 3 {
scope 4 {
scope 5 {
}
}
}
}
}
bb0: {
2023-06-06 08:47:00 -05:00
- StorageLive(_5);
+ StorageLive(_8);
+ StorageLive(_9);
+ StorageLive(_10);
+ StorageLive(_11);
+ nop;
StorageLive(_6);
_6 = ();
StorageLive(_7);
_7 = Option::<isize>::Some(const -4_isize);
- _5 = Foo { a: const 5_u8, b: move _6, c: const "a", d: move _7 };
+ _8 = const 5_u8;
+ _9 = move _6;
+ _10 = const "a";
+ _11 = move _7;
+ nop;
StorageDead(_7);
StorageDead(_6);
StorageLive(_1);
2024-08-18 16:26:34 -05:00
- _1 = copy (_5.0: u8);
+ _1 = copy _8;
2023-06-06 08:47:00 -05:00
StorageLive(_2);
2024-08-18 16:26:34 -05:00
- _2 = copy (_5.1: ());
+ _2 = copy _9;
2023-06-06 08:47:00 -05:00
StorageLive(_3);
2024-08-18 16:26:34 -05:00
- _3 = copy (_5.2: &str);
+ _3 = copy _10;
2023-06-06 08:47:00 -05:00
StorageLive(_4);
2024-08-18 16:26:34 -05:00
- _4 = copy (_5.3: std::option::Option<isize>);
2023-06-06 08:47:00 -05:00
- StorageDead(_5);
2024-08-18 16:26:34 -05:00
+ _4 = copy _11;
2023-06-06 08:47:00 -05:00
+ StorageDead(_8);
+ StorageDead(_9);
+ StorageDead(_10);
+ StorageDead(_11);
+ nop;
_0 = const ();
StorageDead(_4);
StorageDead(_3);
StorageDead(_2);
StorageDead(_1);
return;
2023-03-05 12:06:55 -06:00
}
}