96 lines
5.6 KiB
Rust
96 lines
5.6 KiB
Rust
|
// MIR for `inclusive_loop` after PreCodegen
|
||
|
|
||
|
fn inclusive_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
||
|
debug start => _1; // in scope 0 at $DIR/range_iter.rs:+0:23: +0:28
|
||
|
debug end => _2; // in scope 0 at $DIR/range_iter.rs:+0:35: +0:38
|
||
|
debug f => _3; // in scope 0 at $DIR/range_iter.rs:+0:45: +0:46
|
||
|
let mut _0: (); // return place in scope 0 at $DIR/range_iter.rs:+0:62: +0:62
|
||
|
let mut _4: std::ops::RangeInclusive<u32>; // in scope 0 at $DIR/range_iter.rs:+1:14: +1:25
|
||
|
let mut _5: std::ops::RangeInclusive<u32>; // in scope 0 at $DIR/range_iter.rs:+1:14: +1:25
|
||
|
let _6: (); // in scope 0 at $DIR/range_iter.rs:+1:14: +1:25
|
||
|
let mut _7: std::option::Option<u32>; // in scope 0 at $DIR/range_iter.rs:+1:14: +1:25
|
||
|
let mut _8: &mut std::ops::RangeInclusive<u32>; // in scope 0 at $DIR/range_iter.rs:+1:14: +1:25
|
||
|
let mut _9: isize; // in scope 0 at $DIR/range_iter.rs:+1:5: +3:6
|
||
|
let mut _11: &impl Fn(u32); // in scope 0 at $DIR/range_iter.rs:+2:9: +2:10
|
||
|
let mut _12: (u32,); // in scope 0 at $DIR/range_iter.rs:+2:9: +2:13
|
||
|
scope 1 {
|
||
|
debug iter => _5; // in scope 1 at $DIR/range_iter.rs:+1:14: +1:25
|
||
|
let _10: u32; // in scope 1 at $DIR/range_iter.rs:+1:9: +1:10
|
||
|
scope 2 {
|
||
|
debug x => _10; // in scope 2 at $DIR/range_iter.rs:+1:9: +1:10
|
||
|
}
|
||
|
scope 5 (inlined iter::range::<impl Iterator for RangeInclusive<u32>>::next) { // at $DIR/range_iter.rs:28:14: 28:25
|
||
|
debug self => _8; // in scope 5 at $SRC_DIR/core/src/iter/range.rs:LL:COL
|
||
|
}
|
||
|
}
|
||
|
scope 3 (inlined RangeInclusive::<u32>::new) { // at $DIR/range_iter.rs:28:14: 28:25
|
||
|
debug start => _1; // in scope 3 at $SRC_DIR/core/src/ops/range.rs:LL:COL
|
||
|
debug end => _2; // in scope 3 at $SRC_DIR/core/src/ops/range.rs:LL:COL
|
||
|
}
|
||
|
scope 4 (inlined <RangeInclusive<u32> as IntoIterator>::into_iter) { // at $DIR/range_iter.rs:28:14: 28:25
|
||
|
debug self => _4; // in scope 4 at $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
|
||
|
}
|
||
|
|
||
|
bb0: {
|
||
|
_4 = RangeInclusive::<u32> { start: _1, end: _2, exhausted: const false }; // scope 3 at $SRC_DIR/core/src/ops/range.rs:LL:COL
|
||
|
StorageLive(_5); // scope 0 at $DIR/range_iter.rs:+1:14: +1:25
|
||
|
_5 = move _4; // scope 0 at $DIR/range_iter.rs:+1:14: +1:25
|
||
|
goto -> bb1; // scope 1 at $DIR/range_iter.rs:+1:5: +3:6
|
||
|
}
|
||
|
|
||
|
bb1: {
|
||
|
StorageLive(_7); // scope 1 at $DIR/range_iter.rs:+1:14: +1:25
|
||
|
_8 = &mut _5; // scope 1 at $DIR/range_iter.rs:+1:14: +1:25
|
||
|
_7 = <RangeInclusive<u32> as iter::range::RangeInclusiveIteratorImpl>::spec_next(_8) -> [return: bb9, unwind: bb7]; // scope 5 at $SRC_DIR/core/src/iter/range.rs:LL:COL
|
||
|
// mir::Constant
|
||
|
// + span: $SRC_DIR/core/src/iter/range.rs:LL:COL
|
||
|
// + literal: Const { ty: for<'a> fn(&'a mut RangeInclusive<u32>) -> Option<<RangeInclusive<u32> as iter::range::RangeInclusiveIteratorImpl>::Item> {<RangeInclusive<u32> as iter::range::RangeInclusiveIteratorImpl>::spec_next}, val: Value(<ZST>) }
|
||
|
}
|
||
|
|
||
|
bb2: {
|
||
|
_10 = ((_7 as Some).0: u32); // scope 1 at $DIR/range_iter.rs:+1:9: +1:10
|
||
|
StorageLive(_11); // scope 2 at $DIR/range_iter.rs:+2:9: +2:10
|
||
|
_11 = &_3; // scope 2 at $DIR/range_iter.rs:+2:9: +2:10
|
||
|
StorageLive(_12); // scope 2 at $DIR/range_iter.rs:+2:9: +2:13
|
||
|
_12 = (_10,); // scope 2 at $DIR/range_iter.rs:+2:9: +2:13
|
||
|
_6 = <impl Fn(u32) as Fn<(u32,)>>::call(move _11, move _12) -> [return: bb5, unwind: bb7]; // scope 2 at $DIR/range_iter.rs:+2:9: +2:13
|
||
|
// mir::Constant
|
||
|
// + span: $DIR/range_iter.rs:29:9: 29:10
|
||
|
// + literal: Const { ty: for<'a> extern "rust-call" fn(&'a impl Fn(u32), (u32,)) -> <impl Fn(u32) as FnOnce<(u32,)>>::Output {<impl Fn(u32) as Fn<(u32,)>>::call}, val: Value(<ZST>) }
|
||
|
}
|
||
|
|
||
|
bb3: {
|
||
|
unreachable; // scope 1 at $DIR/range_iter.rs:+1:14: +1:25
|
||
|
}
|
||
|
|
||
|
bb4: {
|
||
|
StorageDead(_7); // scope 1 at $DIR/range_iter.rs:+3:5: +3:6
|
||
|
StorageDead(_5); // scope 0 at $DIR/range_iter.rs:+3:5: +3:6
|
||
|
drop(_3) -> bb6; // scope 0 at $DIR/range_iter.rs:+4:1: +4:2
|
||
|
}
|
||
|
|
||
|
bb5: {
|
||
|
StorageDead(_12); // scope 2 at $DIR/range_iter.rs:+2:12: +2:13
|
||
|
StorageDead(_11); // scope 2 at $DIR/range_iter.rs:+2:12: +2:13
|
||
|
StorageDead(_7); // scope 1 at $DIR/range_iter.rs:+3:5: +3:6
|
||
|
goto -> bb1; // scope 1 at $DIR/range_iter.rs:+1:5: +3:6
|
||
|
}
|
||
|
|
||
|
bb6: {
|
||
|
return; // scope 0 at $DIR/range_iter.rs:+4:2: +4:2
|
||
|
}
|
||
|
|
||
|
bb7 (cleanup): {
|
||
|
drop(_3) -> [return: bb8, unwind terminate]; // scope 0 at $DIR/range_iter.rs:+4:1: +4:2
|
||
|
}
|
||
|
|
||
|
bb8 (cleanup): {
|
||
|
resume; // scope 0 at $DIR/range_iter.rs:+0:1: +4:2
|
||
|
}
|
||
|
|
||
|
bb9: {
|
||
|
_9 = discriminant(_7); // scope 1 at $DIR/range_iter.rs:+1:14: +1:25
|
||
|
switchInt(move _9) -> [0: bb4, 1: bb2, otherwise: bb3]; // scope 1 at $DIR/range_iter.rs:+1:14: +1:25
|
||
|
}
|
||
|
}
|