2022-10-06 18:11:06 -05:00
|
|
|
- // MIR for `main` before DataflowConstProp
|
|
|
|
+ // MIR for `main` after DataflowConstProp
|
|
|
|
|
|
|
|
fn main() -> () {
|
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/ref_without_sb.rs:+0:11: +0:11
|
|
|
|
let mut _1: i32; // in scope 0 at $DIR/ref_without_sb.rs:+1:9: +1:14
|
|
|
|
let _2: (); // in scope 0 at $DIR/ref_without_sb.rs:+2:5: +2:15
|
|
|
|
let mut _3: &i32; // in scope 0 at $DIR/ref_without_sb.rs:+2:12: +2:14
|
|
|
|
let _4: &i32; // in scope 0 at $DIR/ref_without_sb.rs:+2:12: +2:14
|
2022-10-06 18:17:43 -05:00
|
|
|
let _5: (); // in scope 0 at $DIR/ref_without_sb.rs:+4:5: +4:20
|
2022-10-06 18:11:06 -05:00
|
|
|
scope 1 {
|
|
|
|
debug a => _1; // in scope 1 at $DIR/ref_without_sb.rs:+1:9: +1:14
|
2022-11-09 11:03:30 -06:00
|
|
|
let _6: i32; // in scope 1 at $DIR/ref_without_sb.rs:+6:9: +6:10
|
2022-10-06 18:11:06 -05:00
|
|
|
scope 2 {
|
2022-11-09 11:03:30 -06:00
|
|
|
debug b => _6; // in scope 2 at $DIR/ref_without_sb.rs:+6:9: +6:10
|
2022-10-06 18:11:06 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
|
|
|
StorageLive(_1); // scope 0 at $DIR/ref_without_sb.rs:+1:9: +1:14
|
|
|
|
_1 = const 0_i32; // scope 0 at $DIR/ref_without_sb.rs:+1:17: +1:18
|
|
|
|
StorageLive(_2); // scope 1 at $DIR/ref_without_sb.rs:+2:5: +2:15
|
|
|
|
StorageLive(_3); // scope 1 at $DIR/ref_without_sb.rs:+2:12: +2:14
|
|
|
|
StorageLive(_4); // scope 1 at $DIR/ref_without_sb.rs:+2:12: +2:14
|
|
|
|
_4 = &_1; // scope 1 at $DIR/ref_without_sb.rs:+2:12: +2:14
|
|
|
|
_3 = &(*_4); // scope 1 at $DIR/ref_without_sb.rs:+2:12: +2:14
|
|
|
|
_2 = escape::<i32>(move _3) -> bb1; // scope 1 at $DIR/ref_without_sb.rs:+2:5: +2:15
|
|
|
|
// mir::Constant
|
2023-04-05 03:44:20 -05:00
|
|
|
// + span: $DIR/ref_without_sb.rs:13:5: 13:11
|
2022-10-06 18:11:06 -05:00
|
|
|
// + literal: Const { ty: for<'a> fn(&'a i32) {escape::<i32>}, val: Value(<ZST>) }
|
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
|
|
|
StorageDead(_3); // scope 1 at $DIR/ref_without_sb.rs:+2:14: +2:15
|
|
|
|
StorageDead(_4); // scope 1 at $DIR/ref_without_sb.rs:+2:15: +2:16
|
|
|
|
StorageDead(_2); // scope 1 at $DIR/ref_without_sb.rs:+2:15: +2:16
|
|
|
|
_1 = const 1_i32; // scope 1 at $DIR/ref_without_sb.rs:+3:5: +3:10
|
2022-10-06 18:17:43 -05:00
|
|
|
StorageLive(_5); // scope 1 at $DIR/ref_without_sb.rs:+4:5: +4:20
|
|
|
|
_5 = some_function() -> bb2; // scope 1 at $DIR/ref_without_sb.rs:+4:5: +4:20
|
|
|
|
// mir::Constant
|
2023-04-05 03:44:20 -05:00
|
|
|
// + span: $DIR/ref_without_sb.rs:15:5: 15:18
|
2022-10-06 18:17:43 -05:00
|
|
|
// + literal: Const { ty: fn() {some_function}, val: Value(<ZST>) }
|
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
|
|
|
StorageDead(_5); // scope 1 at $DIR/ref_without_sb.rs:+4:20: +4:21
|
2022-11-09 11:03:30 -06:00
|
|
|
StorageLive(_6); // scope 1 at $DIR/ref_without_sb.rs:+6:9: +6:10
|
|
|
|
_6 = _1; // scope 1 at $DIR/ref_without_sb.rs:+6:13: +6:14
|
|
|
|
_0 = const (); // scope 0 at $DIR/ref_without_sb.rs:+0:11: +7:2
|
|
|
|
StorageDead(_6); // scope 1 at $DIR/ref_without_sb.rs:+7:1: +7:2
|
|
|
|
StorageDead(_1); // scope 0 at $DIR/ref_without_sb.rs:+7:1: +7:2
|
|
|
|
return; // scope 0 at $DIR/ref_without_sb.rs:+7:2: +7:2
|
2022-10-06 18:11:06 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|