2023-04-23 04:38:37 -05:00
|
|
|
// MIR for `forward_loop` after PreCodegen
|
|
|
|
|
|
|
|
fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug start => _1;
|
|
|
|
debug end => _2;
|
|
|
|
debug f => _3;
|
|
|
|
let mut _0: ();
|
2023-08-17 12:06:55 -05:00
|
|
|
let mut _4: std::ops::Range<u32>;
|
|
|
|
let mut _5: std::ops::Range<u32>;
|
2023-01-12 14:04:42 -06:00
|
|
|
let mut _6: &mut std::ops::Range<u32>;
|
2023-01-18 11:57:50 -06:00
|
|
|
let mut _14: std::option::Option<u32>;
|
|
|
|
let mut _16: &impl Fn(u32);
|
|
|
|
let mut _17: (u32,);
|
|
|
|
let _18: ();
|
2023-04-23 04:38:37 -05:00
|
|
|
scope 1 {
|
2023-08-17 12:06:55 -05:00
|
|
|
debug iter => _5;
|
2023-01-18 11:57:50 -06:00
|
|
|
let _15: u32;
|
2023-04-23 04:38:37 -05:00
|
|
|
scope 2 {
|
2023-01-18 11:57:50 -06:00
|
|
|
debug x => _15;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 4 (inlined iter::range::<impl Iterator for std::ops::Range<u32>>::next) {
|
2023-01-12 14:04:42 -06:00
|
|
|
debug self => _6;
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 5 (inlined <std::ops::Range<u32> as iter::range::RangeIteratorImpl>::spec_next) {
|
2023-01-12 14:04:42 -06:00
|
|
|
debug self => _6;
|
|
|
|
let mut _7: &u32;
|
|
|
|
let mut _8: &u32;
|
|
|
|
let mut _11: bool;
|
2023-01-18 11:57:50 -06:00
|
|
|
let _12: u32;
|
|
|
|
let mut _13: u32;
|
2023-05-29 14:29:36 -05:00
|
|
|
scope 6 {
|
2023-01-18 11:57:50 -06:00
|
|
|
debug old => _12;
|
2023-05-29 14:29:36 -05:00
|
|
|
scope 7 {
|
|
|
|
}
|
|
|
|
}
|
2023-11-19 18:04:06 -06:00
|
|
|
scope 8 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
|
2023-01-12 14:04:42 -06:00
|
|
|
debug self => _7;
|
|
|
|
debug other => _8;
|
|
|
|
let mut _9: u32;
|
|
|
|
let mut _10: u32;
|
2023-06-03 07:23:32 -05:00
|
|
|
}
|
2023-05-29 14:29:36 -05:00
|
|
|
}
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
}
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 3 (inlined <std::ops::Range<u32> as IntoIterator>::into_iter) {
|
2023-08-17 12:06:55 -05:00
|
|
|
debug self => _4;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-08-17 12:06:55 -05:00
|
|
|
_4 = std::ops::Range::<u32> { start: _1, end: _2 };
|
|
|
|
StorageLive(_5);
|
2024-01-06 12:34:25 -06:00
|
|
|
_5 = _4;
|
2023-06-06 08:47:00 -05:00
|
|
|
goto -> bb1;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-01-18 11:57:50 -06:00
|
|
|
StorageLive(_14);
|
2023-01-12 14:04:42 -06:00
|
|
|
_6 = &mut _5;
|
2023-01-18 11:57:50 -06:00
|
|
|
StorageLive(_12);
|
2023-01-12 14:04:42 -06:00
|
|
|
StorageLive(_11);
|
|
|
|
StorageLive(_7);
|
|
|
|
_7 = &(_5.0: u32);
|
|
|
|
StorageLive(_8);
|
|
|
|
_8 = &(_5.1: u32);
|
2023-08-17 12:06:55 -05:00
|
|
|
StorageLive(_9);
|
2023-01-12 14:04:42 -06:00
|
|
|
_9 = (_5.0: u32);
|
2023-08-17 12:06:55 -05:00
|
|
|
StorageLive(_10);
|
2023-01-12 14:04:42 -06:00
|
|
|
_10 = (_5.1: u32);
|
|
|
|
_11 = Lt(move _9, move _10);
|
|
|
|
StorageDead(_10);
|
|
|
|
StorageDead(_9);
|
2023-01-18 11:57:50 -06:00
|
|
|
switchInt(move _11) -> [0: bb2, otherwise: bb4];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb2: {
|
2023-01-12 14:04:42 -06:00
|
|
|
StorageDead(_8);
|
|
|
|
StorageDead(_7);
|
2023-01-18 11:57:50 -06:00
|
|
|
StorageDead(_11);
|
|
|
|
StorageDead(_12);
|
|
|
|
StorageDead(_14);
|
|
|
|
StorageDead(_5);
|
|
|
|
drop(_3) -> [return: bb3, unwind unreachable];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb3: {
|
2023-01-18 11:57:50 -06:00
|
|
|
return;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb4: {
|
2023-01-18 11:57:50 -06:00
|
|
|
StorageDead(_8);
|
|
|
|
StorageDead(_7);
|
|
|
|
_12 = (_5.0: u32);
|
|
|
|
StorageLive(_13);
|
|
|
|
_13 = <u32 as Step>::forward_unchecked(_12, const 1_usize) -> [return: bb5, unwind unreachable];
|
2023-05-29 14:29:36 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb5: {
|
2023-01-18 11:57:50 -06:00
|
|
|
(_5.0: u32) = move _13;
|
2023-01-12 14:04:42 -06:00
|
|
|
StorageDead(_13);
|
2023-01-18 11:57:50 -06:00
|
|
|
_14 = Option::<u32>::Some(_12);
|
|
|
|
StorageDead(_11);
|
2023-01-12 14:04:42 -06:00
|
|
|
StorageDead(_12);
|
2023-01-18 11:57:50 -06:00
|
|
|
_15 = ((_14 as Some).0: u32);
|
|
|
|
StorageLive(_16);
|
|
|
|
_16 = &_3;
|
2023-01-12 14:04:42 -06:00
|
|
|
StorageLive(_17);
|
2023-01-18 11:57:50 -06:00
|
|
|
_17 = (_15,);
|
|
|
|
_18 = <impl Fn(u32) as Fn<(u32,)>>::call(move _16, move _17) -> [return: bb6, unwind unreachable];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-01-18 11:57:50 -06:00
|
|
|
bb6: {
|
2023-01-12 14:04:42 -06:00
|
|
|
StorageDead(_17);
|
2023-01-18 11:57:50 -06:00
|
|
|
StorageDead(_16);
|
|
|
|
StorageDead(_14);
|
2023-06-06 08:47:00 -05:00
|
|
|
goto -> bb1;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
2023-05-21 05:33:03 -05:00
|
|
|
}
|