]>
Commit | Line | Data |
---|---|---|
ba9703b0 XL |
1 | - // MIR for `hello` before ConstProp |
2 | + // MIR for `hello` after ConstProp | |
3 | ||
4 | fn hello() -> () { | |
5 | let mut _0: (); // return place in scope 0 at $DIR/control-flow-simplification.rs:11:14: 11:14 | |
6 | let mut _1: bool; // in scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21 | |
5869c6ff | 7 | let mut _2: !; // in scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL |
ba9703b0 XL |
8 | |
9 | bb0: { | |
f9f354fc XL |
10 | StorageLive(_1); // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21 |
11 | - _1 = const <bool as NeedsDrop>::NEEDS; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21 | |
5869c6ff | 12 | - switchInt(move _1) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6 |
3dfed10e | 13 | + _1 = const false; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21 |
5869c6ff | 14 | + switchInt(const false) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6 |
ba9703b0 XL |
15 | } |
16 | ||
17 | bb1: { | |
5869c6ff XL |
18 | StorageLive(_2); // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL |
19 | begin_panic::<&str>(const "explicit panic"); // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL | |
ba9703b0 | 20 | // mir::Constant |
5869c6ff | 21 | // + span: $SRC_DIR/std/src/panic.rs:LL:COL |
ba9703b0 XL |
22 | // + literal: Const { ty: fn(&str) -> ! {std::rt::begin_panic::<&str>}, val: Value(Scalar(<ZST>)) } |
23 | // ty::Const | |
24 | // + ty: &str | |
17df50a5 | 25 | // + val: Value(Slice { data: Allocation { bytes: [101, 120, 112, 108, 105, 99, 105, 116, 32, 112, 97, 110, 105, 99], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [16383], len: Size { raw: 14 } }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 14 }) |
ba9703b0 | 26 | // mir::Constant |
5869c6ff | 27 | // + span: $SRC_DIR/std/src/panic.rs:LL:COL |
17df50a5 | 28 | // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [101, 120, 112, 108, 105, 99, 105, 116, 32, 112, 97, 110, 105, 99], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [16383], len: Size { raw: 14 } }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 14 }) } |
ba9703b0 | 29 | } |
5869c6ff XL |
30 | |
31 | bb2: { | |
32 | _0 = const (); // scope 0 at $DIR/control-flow-simplification.rs:14:6: 14:6 | |
33 | StorageDead(_1); // scope 0 at $DIR/control-flow-simplification.rs:14:5: 14:6 | |
34 | return; // scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2 | |
35 | } | |
ba9703b0 XL |
36 | } |
37 |