| - // 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 |
| 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 |
| 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 |
| 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 |
| - _2 = foo(move _3) -> bb1; // scope 1 at $DIR/terminator.rs:+3:5: +3:15 |
| + _2 = foo(const 2_i32) -> bb1; // scope 1 at $DIR/terminator.rs:+3:5: +3:15 |
| // mir::Constant |
| // + span: $DIR/terminator.rs:9:5: 9:8 |
| // + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) } |
| } |
| |
| bb1: { |
| 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 |
| } |
| } |
| |