2022-08-25 11:43:46 -05:00
|
|
|
- // MIR for `main` before DataflowConstProp
|
|
|
|
+ // MIR for `main` after DataflowConstProp
|
|
|
|
|
|
|
|
fn main() -> () {
|
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/terminator.rs:+0:11: +0:11
|
|
|
|
let _1: i32; // in scope 0 at $DIR/terminator.rs:+1:9: +1:10
|
2022-11-09 11:03:30 -06:00
|
|
|
let _2: (); // in scope 0 at $DIR/terminator.rs:+3:5: +3:15
|
|
|
|
let mut _3: i32; // in scope 0 at $DIR/terminator.rs:+3:9: +3:14
|
|
|
|
let mut _4: i32; // in scope 0 at $DIR/terminator.rs:+3:9: +3:10
|
2022-08-25 11:43:46 -05:00
|
|
|
scope 1 {
|
|
|
|
debug a => _1; // in scope 1 at $DIR/terminator.rs:+1:9: +1:10
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
|
|
|
StorageLive(_1); // scope 0 at $DIR/terminator.rs:+1:9: +1:10
|
|
|
|
_1 = const 1_i32; // scope 0 at $DIR/terminator.rs:+1:13: +1:14
|
2022-11-09 11:03:30 -06:00
|
|
|
StorageLive(_2); // scope 1 at $DIR/terminator.rs:+3:5: +3:15
|
|
|
|
StorageLive(_3); // scope 1 at $DIR/terminator.rs:+3:9: +3:14
|
|
|
|
StorageLive(_4); // scope 1 at $DIR/terminator.rs:+3:9: +3:10
|
|
|
|
- _4 = _1; // scope 1 at $DIR/terminator.rs:+3:9: +3:10
|
|
|
|
- _3 = Add(move _4, const 1_i32); // scope 1 at $DIR/terminator.rs:+3:9: +3:14
|
|
|
|
+ _4 = const 1_i32; // scope 1 at $DIR/terminator.rs:+3:9: +3:10
|
|
|
|
+ _3 = const 2_i32; // scope 1 at $DIR/terminator.rs:+3:9: +3:14
|
|
|
|
StorageDead(_4); // scope 1 at $DIR/terminator.rs:+3:13: +3:14
|
2023-06-08 02:34:53 -05:00
|
|
|
- _2 = foo(move _3) -> [return: bb1, unwind unreachable]; // scope 1 at $DIR/terminator.rs:+3:5: +3:15
|
|
|
|
+ _2 = foo(const 2_i32) -> [return: bb1, unwind unreachable]; // scope 1 at $DIR/terminator.rs:+3:5: +3:15
|
2022-08-25 11:43:46 -05:00
|
|
|
// mir::Constant
|
2023-04-05 03:44:20 -05:00
|
|
|
// + span: $DIR/terminator.rs:10:5: 10:8
|
2022-08-25 11:43:46 -05:00
|
|
|
// + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
|
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2022-11-09 11:03:30 -06:00
|
|
|
StorageDead(_3); // scope 1 at $DIR/terminator.rs:+3:14: +3:15
|
|
|
|
StorageDead(_2); // scope 1 at $DIR/terminator.rs:+3:15: +3:16
|
|
|
|
_0 = const (); // scope 0 at $DIR/terminator.rs:+0:11: +4:2
|
|
|
|
StorageDead(_1); // scope 0 at $DIR/terminator.rs:+4:1: +4:2
|
|
|
|
return; // scope 0 at $DIR/terminator.rs:+4:2: +4:2
|
2022-08-25 11:43:46 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|