rust/tests/mir-opt/retag.main.SimplifyCfg-pre-optimizations.after.panic-unwind.mir

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

181 lines
4.2 KiB
Rust
Raw Normal View History

// MIR for `main` after SimplifyCfg-pre-optimizations
2020-04-02 16:09:01 -05:00
fn main() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let mut _1: i32;
let _2: ();
let mut _4: &Test;
let _5: Test;
let mut _6: &mut i32;
let mut _7: &mut i32;
let mut _9: &mut i32;
let mut _12: *mut i32;
let mut _14: {closure@main::{closure#0}};
2023-06-06 08:47:00 -05:00
let mut _16: for<'a> fn(&'a i32) -> &'a i32;
let mut _17: &i32;
let _18: &i32;
let _19: &i32;
let mut _20: &Test;
let _21: Test;
let mut _22: &i32;
let _23: &i32;
let _24: i32;
let mut _26: *const i32;
let _27: ();
2020-04-02 16:09:01 -05:00
scope 1 {
2023-06-06 08:47:00 -05:00
debug x => _1;
let _3: &mut i32;
let _13: for<'a> fn(&'a i32) -> &'a i32;
2020-04-02 16:09:01 -05:00
scope 2 {
2023-06-06 08:47:00 -05:00
debug v => _3;
let _8: &mut i32;
2020-04-02 16:09:01 -05:00
scope 3 {
2023-06-06 08:47:00 -05:00
debug w => _8;
let _10: &mut i32;
2020-04-02 16:09:01 -05:00
scope 4 {
2023-06-06 08:47:00 -05:00
debug w => _10;
let _11: *mut i32;
2020-04-02 16:09:01 -05:00
scope 5 {
2023-06-06 08:47:00 -05:00
debug _w => _11;
2020-04-02 16:09:01 -05:00
}
}
}
}
scope 6 {
2023-06-06 08:47:00 -05:00
debug c => _13;
let _15: &i32;
2020-04-02 16:09:01 -05:00
scope 7 {
2023-06-06 08:47:00 -05:00
debug _w => _15;
let _25: *const i32;
let mut _28: &i32;
2020-04-02 16:09:01 -05:00
scope 8 {
2023-06-06 08:47:00 -05:00
debug _w => _25;
2020-04-02 16:09:01 -05:00
}
}
}
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
_1 = const 0_i32;
StorageLive(_2);
StorageLive(_3);
StorageLive(_4);
StorageLive(_5);
_5 = Test(const 0_i32);
_4 = &_5;
StorageLive(_6);
StorageLive(_7);
_7 = &mut _1;
_6 = &mut (*_7);
_3 = Test::foo(move _4, move _6) -> [return: bb1, unwind: bb8];
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb1: {
2023-06-06 08:47:00 -05:00
Retag(_3);
StorageDead(_6);
StorageDead(_4);
StorageDead(_7);
drop(_5) -> [return: bb2, unwind: bb9];
}
2020-10-02 15:11:24 -05:00
bb2: {
2023-06-06 08:47:00 -05:00
StorageDead(_5);
StorageLive(_8);
StorageLive(_9);
_9 = move _3;
Retag(_9);
_8 = &mut (*_9);
StorageDead(_9);
StorageLive(_10);
_10 = move _8;
Retag(_10);
StorageLive(_11);
StorageLive(_12);
_12 = &raw mut (*_10);
_11 = _12;
StorageDead(_12);
_2 = const ();
StorageDead(_11);
StorageDead(_10);
StorageDead(_8);
StorageDead(_3);
StorageDead(_2);
StorageLive(_13);
StorageLive(_14);
_14 = {closure@main::{closure#0}};
2023-06-06 08:47:00 -05:00
Retag(_14);
2024-05-17 12:17:48 -05:00
_13 = move _14 as for<'a> fn(&'a i32) -> &'a i32 (PointerCoercion(ClosureFnPointer(Safe)));
2023-06-06 08:47:00 -05:00
StorageDead(_14);
StorageLive(_15);
StorageLive(_16);
_16 = _13;
StorageLive(_17);
StorageLive(_18);
_18 = &_1;
_17 = &(*_18);
2023-06-23 11:53:09 -05:00
_15 = move _16(move _17) -> [return: bb3, unwind continue];
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb3: {
2023-06-06 08:47:00 -05:00
Retag(_15);
StorageDead(_17);
StorageDead(_16);
StorageDead(_18);
StorageLive(_19);
StorageLive(_20);
StorageLive(_21);
_21 = Test(const 0_i32);
_20 = &_21;
StorageLive(_22);
StorageLive(_23);
_28 = const main::promoted[0];
2023-06-06 08:47:00 -05:00
Retag(_28);
_23 = &(*_28);
_22 = &(*_23);
_19 = Test::foo_shr(move _20, move _22) -> [return: bb4, unwind: bb7];
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb4: {
2023-06-06 08:47:00 -05:00
Retag(_19);
StorageDead(_22);
StorageDead(_20);
StorageDead(_23);
drop(_21) -> [return: bb5, unwind: bb9];
}
2020-10-02 15:11:24 -05:00
bb5: {
2023-06-06 08:47:00 -05:00
StorageDead(_21);
StorageDead(_19);
StorageLive(_25);
StorageLive(_26);
_26 = &raw const (*_15);
_25 = _26;
StorageDead(_26);
StorageLive(_27);
2023-06-23 11:53:09 -05:00
_27 = array_casts() -> [return: bb6, unwind continue];
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb6: {
2023-06-06 08:47:00 -05:00
StorageDead(_27);
_0 = const ();
StorageDead(_25);
StorageDead(_15);
StorageDead(_13);
StorageDead(_1);
return;
2020-10-02 15:11:24 -05:00
}
bb7 (cleanup): {
2023-08-24 07:26:26 -05:00
drop(_21) -> [return: bb9, unwind terminate(cleanup)];
2020-10-02 15:11:24 -05:00
}
bb8 (cleanup): {
2023-08-24 07:26:26 -05:00
drop(_5) -> [return: bb9, unwind terminate(cleanup)];
}
bb9 (cleanup): {
2023-06-06 08:47:00 -05:00
resume;
2020-10-02 15:11:24 -05:00
}
2020-04-02 16:09:01 -05:00
}