rust/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir

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

106 lines
3.1 KiB
Rust
Raw Normal View History

2020-04-04 12:15:01 -05:00
// MIR for `main` 0 nll
| Free Region Mapping
2023-04-21 19:08:38 -05:00
| '?0 | Global | ['?0, '?1]
| '?1 | Local | ['?1]
2020-04-04 12:15:01 -05:00
|
| Inferred Region Values
2023-04-21 19:08:38 -05:00
| '?0 | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '?0, '?1}
| '?1 | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '?1}
| '?2 | U0 | {bb1[0..=7], bb2[0..=2]}
| '?3 | U0 | {bb1[1..=7], bb2[0..=2]}
| '?4 | U0 | {bb1[4..=7], bb2[0..=2]}
2020-04-04 12:15:01 -05:00
|
| Inference Constraints
2023-04-21 19:08:38 -05:00
| '?0 live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0]}
| '?1 live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0]}
| '?2 live at {bb1[0]}
| '?3 live at {bb1[1..=3]}
| '?4 live at {bb1[4..=7], bb2[0..=2]}
| '?2: '?3 due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:18:13: 18:18 (#0)
| '?3: '?4 due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:19:13: 19:14 (#0)
2020-04-04 12:15:01 -05:00
|
fn main() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let mut _1: [usize; ValTree(Leaf(0x0000000000000003): usize)];
2023-06-06 08:47:00 -05:00
let _3: usize;
let mut _4: usize;
let mut _5: bool;
let mut _7: bool;
let _8: bool;
let mut _9: usize;
let _10: bool;
2020-04-04 12:15:01 -05:00
scope 1 {
2023-06-06 08:47:00 -05:00
debug v => _1;
let _2: &'?3 usize;
2020-04-04 12:15:01 -05:00
scope 2 {
2023-06-06 08:47:00 -05:00
debug p => _2;
let _6: &'?4 usize;
2020-04-04 12:15:01 -05:00
scope 3 {
2023-06-06 08:47:00 -05:00
debug q => _6;
2020-04-04 12:15:01 -05:00
}
}
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
_1 = [const ConstValue(Scalar(0x0000000000000001): usize), const ConstValue(Scalar(0x0000000000000002): usize), const ConstValue(Scalar(0x0000000000000003): usize)];
FakeRead(ForLet(None), _1);
StorageLive(_2);
StorageLive(_3);
_3 = const ConstValue(Scalar(0x0000000000000000): usize);
_4 = Len(_1);
_5 = Lt(_3, _4);
assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind: bb7];
2020-04-04 12:15:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb1: {
2023-06-06 08:47:00 -05:00
_2 = &'?2 _1[_3];
FakeRead(ForLet(None), _2);
StorageLive(_6);
_6 = _2;
FakeRead(ForLet(None), _6);
StorageLive(_7);
_7 = const ConstValue(Scalar(0x01): bool);
switchInt(move _7) -> [0: bb4, otherwise: bb2];
}
bb2: {
2023-06-06 08:47:00 -05:00
StorageLive(_8);
StorageLive(_9);
_9 = (*_6);
_8 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(move _9) -> [return: bb3, unwind: bb7];
2020-04-04 12:15:01 -05:00
}
bb3: {
2023-06-06 08:47:00 -05:00
StorageDead(_9);
StorageDead(_8);
_0 = const ConstValue(ZeroSized: ());
goto -> bb6;
2020-04-04 12:15:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb4: {
2023-06-06 08:47:00 -05:00
StorageLive(_10);
_10 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(const ConstValue(Scalar(0x0000000000000016): usize)) -> [return: bb5, unwind: bb7];
2020-04-04 12:15:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb5: {
2023-06-06 08:47:00 -05:00
StorageDead(_10);
_0 = const ConstValue(ZeroSized: ());
goto -> bb6;
2020-10-02 15:11:24 -05:00
}
bb6: {
2023-06-06 08:47:00 -05:00
StorageDead(_7);
StorageDead(_6);
StorageDead(_3);
StorageDead(_2);
StorageDead(_1);
return;
2020-04-04 12:15:01 -05:00
}
2021-01-01 12:38:11 -06:00
bb7 (cleanup): {
2023-06-06 08:47:00 -05:00
resume;
2020-04-04 12:15:01 -05:00
}
}