2023-04-23 09:38:37 +00:00
|
|
|
// MIR for `forward_loop` after PreCodegen
|
|
|
|
|
|
|
|
fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
2023-06-06 13:47:00 +00:00
|
|
|
debug start => _1;
|
|
|
|
debug end => _2;
|
|
|
|
debug f => _3;
|
|
|
|
let mut _0: ();
|
2023-08-17 17:06:55 +00:00
|
|
|
let mut _4: std::ops::Range<u32>;
|
|
|
|
let mut _5: std::ops::Range<u32>;
|
2023-01-12 20:04:42 +00:00
|
|
|
let mut _6: &mut std::ops::Range<u32>;
|
|
|
|
let mut _12: std::option::Option<u32>;
|
|
|
|
let mut _15: isize;
|
|
|
|
let mut _17: &impl Fn(u32);
|
|
|
|
let mut _18: (u32,);
|
|
|
|
let _19: ();
|
2023-04-23 09:38:37 +00:00
|
|
|
scope 1 {
|
2023-08-17 17:06:55 +00:00
|
|
|
debug iter => _5;
|
2023-01-12 20:04:42 +00:00
|
|
|
let _16: u32;
|
2023-04-23 09:38:37 +00:00
|
|
|
scope 2 {
|
2023-01-12 20:04:42 +00:00
|
|
|
debug x => _16;
|
2023-04-23 09:38:37 +00:00
|
|
|
}
|
2023-06-06 13:47:00 +00:00
|
|
|
scope 4 (inlined iter::range::<impl Iterator for std::ops::Range<u32>>::next) {
|
2023-01-12 20:04:42 +00:00
|
|
|
debug self => _6;
|
2023-06-06 13:47:00 +00:00
|
|
|
scope 5 (inlined <std::ops::Range<u32> as iter::range::RangeIteratorImpl>::spec_next) {
|
2023-01-12 20:04:42 +00:00
|
|
|
debug self => _6;
|
|
|
|
let mut _7: &u32;
|
|
|
|
let mut _8: &u32;
|
|
|
|
let mut _11: bool;
|
|
|
|
let _13: u32;
|
|
|
|
let mut _14: u32;
|
2023-05-29 19:29:36 +00:00
|
|
|
scope 6 {
|
2023-01-12 20:04:42 +00:00
|
|
|
debug old => _13;
|
2023-05-29 19:29:36 +00:00
|
|
|
scope 7 {
|
|
|
|
}
|
|
|
|
}
|
2023-11-20 00:04:06 +00:00
|
|
|
scope 8 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
|
2023-01-12 20:04:42 +00:00
|
|
|
debug self => _7;
|
|
|
|
debug other => _8;
|
|
|
|
let mut _9: u32;
|
|
|
|
let mut _10: u32;
|
2023-06-03 12:23:32 +00:00
|
|
|
}
|
2023-05-29 19:29:36 +00:00
|
|
|
}
|
2023-04-23 09:38:37 +00:00
|
|
|
}
|
|
|
|
}
|
2023-06-06 13:47:00 +00:00
|
|
|
scope 3 (inlined <std::ops::Range<u32> as IntoIterator>::into_iter) {
|
2023-08-17 17:06:55 +00:00
|
|
|
debug self => _4;
|
2023-04-23 09:38:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-08-17 17:06:55 +00:00
|
|
|
_4 = std::ops::Range::<u32> { start: _1, end: _2 };
|
|
|
|
StorageLive(_5);
|
|
|
|
_5 = move _4;
|
2023-06-06 13:47:00 +00:00
|
|
|
goto -> bb1;
|
2023-04-23 09:38:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-01-12 20:04:42 +00:00
|
|
|
StorageLive(_12);
|
|
|
|
_6 = &mut _5;
|
|
|
|
StorageLive(_13);
|
|
|
|
StorageLive(_11);
|
|
|
|
StorageLive(_7);
|
|
|
|
_7 = &(_5.0: u32);
|
|
|
|
StorageLive(_8);
|
|
|
|
_8 = &(_5.1: u32);
|
2023-08-17 17:06:55 +00:00
|
|
|
StorageLive(_9);
|
2023-01-12 20:04:42 +00:00
|
|
|
_9 = (_5.0: u32);
|
2023-08-17 17:06:55 +00:00
|
|
|
StorageLive(_10);
|
2023-01-12 20:04:42 +00:00
|
|
|
_10 = (_5.1: u32);
|
|
|
|
_11 = Lt(move _9, move _10);
|
|
|
|
StorageDead(_10);
|
|
|
|
StorageDead(_9);
|
|
|
|
switchInt(move _11) -> [0: bb2, otherwise: bb3];
|
2023-04-23 09:38:37 +00:00
|
|
|
}
|
|
|
|
|
2023-06-03 12:23:32 +00:00
|
|
|
bb2: {
|
2023-01-12 20:04:42 +00:00
|
|
|
StorageDead(_8);
|
|
|
|
StorageDead(_7);
|
2023-05-21 10:33:03 +00:00
|
|
|
_12 = const Option::<u32>::None;
|
2023-06-06 13:47:00 +00:00
|
|
|
goto -> bb5;
|
2023-04-23 09:38:37 +00:00
|
|
|
}
|
|
|
|
|
2023-06-03 12:23:32 +00:00
|
|
|
bb3: {
|
2023-01-12 20:04:42 +00:00
|
|
|
StorageDead(_8);
|
|
|
|
StorageDead(_7);
|
|
|
|
_13 = (_5.0: u32);
|
|
|
|
StorageLive(_14);
|
|
|
|
_14 = <u32 as Step>::forward_unchecked(_13, const 1_usize) -> [return: bb4, unwind: bb11];
|
2023-04-23 09:38:37 +00:00
|
|
|
}
|
|
|
|
|
2023-06-03 12:23:32 +00:00
|
|
|
bb4: {
|
2023-01-12 20:04:42 +00:00
|
|
|
(_5.0: u32) = move _14;
|
|
|
|
StorageDead(_14);
|
|
|
|
_12 = Option::<u32>::Some(_13);
|
2023-06-06 13:47:00 +00:00
|
|
|
goto -> bb5;
|
2023-05-29 19:29:36 +00:00
|
|
|
}
|
|
|
|
|
2023-06-03 12:23:32 +00:00
|
|
|
bb5: {
|
2023-01-12 20:04:42 +00:00
|
|
|
StorageDead(_11);
|
|
|
|
StorageDead(_13);
|
|
|
|
_15 = discriminant(_12);
|
|
|
|
switchInt(move _15) -> [0: bb6, 1: bb8, otherwise: bb10];
|
2023-05-29 19:29:36 +00:00
|
|
|
}
|
|
|
|
|
2023-06-03 12:23:32 +00:00
|
|
|
bb6: {
|
2023-01-12 20:04:42 +00:00
|
|
|
StorageDead(_12);
|
2023-08-17 17:06:55 +00:00
|
|
|
StorageDead(_5);
|
2023-06-23 16:53:09 +00:00
|
|
|
drop(_3) -> [return: bb7, unwind continue];
|
2023-05-29 19:29:36 +00:00
|
|
|
}
|
|
|
|
|
2023-06-03 12:23:32 +00:00
|
|
|
bb7: {
|
2023-06-06 13:47:00 +00:00
|
|
|
return;
|
2023-05-29 19:29:36 +00:00
|
|
|
}
|
|
|
|
|
2023-06-03 12:23:32 +00:00
|
|
|
bb8: {
|
2023-01-12 20:04:42 +00:00
|
|
|
_16 = ((_12 as Some).0: u32);
|
|
|
|
StorageLive(_17);
|
|
|
|
_17 = &_3;
|
|
|
|
StorageLive(_18);
|
|
|
|
_18 = (_16,);
|
|
|
|
_19 = <impl Fn(u32) as Fn<(u32,)>>::call(move _17, move _18) -> [return: bb9, unwind: bb11];
|
2023-04-23 09:38:37 +00:00
|
|
|
}
|
|
|
|
|
2023-06-03 12:23:32 +00:00
|
|
|
bb9: {
|
2023-01-12 20:04:42 +00:00
|
|
|
StorageDead(_18);
|
|
|
|
StorageDead(_17);
|
|
|
|
StorageDead(_12);
|
2023-06-06 13:47:00 +00:00
|
|
|
goto -> bb1;
|
2023-04-23 09:38:37 +00:00
|
|
|
}
|
|
|
|
|
2023-06-03 12:23:32 +00:00
|
|
|
bb10: {
|
2023-06-06 13:47:00 +00:00
|
|
|
unreachable;
|
2023-04-23 09:38:37 +00:00
|
|
|
}
|
|
|
|
|
2023-06-03 12:23:32 +00:00
|
|
|
bb11 (cleanup): {
|
2023-08-24 12:26:26 +00:00
|
|
|
drop(_3) -> [return: bb12, unwind terminate(cleanup)];
|
2023-04-23 09:38:37 +00:00
|
|
|
}
|
|
|
|
|
2023-06-03 12:23:32 +00:00
|
|
|
bb12 (cleanup): {
|
2023-06-06 13:47:00 +00:00
|
|
|
resume;
|
2023-04-23 09:38:37 +00:00
|
|
|
}
|
|
|
|
}
|
2023-05-21 10:33:03 +00:00
|
|
|
|
|
|
|
ALLOC0 (size: 8, align: 4) {
|
|
|
|
00 00 00 00 __ __ __ __ │ ....░░░░
|
|
|
|
}
|