fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1- // MIR for `main` before SimplifyCfg-early-opt 2+ // MIR for `main` after SimplifyCfg-early-opt 3 4 fn main() -> () { 5 let mut _0: (); // return place in scope 0 at $DIR/simplify_cfg.rs:5:11: 5:11 6 let mut _1: (); // in scope 0 at $DIR/simplify_cfg.rs:5:1: 11:2 7 let mut _2: bool; // in scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 8 let mut _3: !; // in scope 0 at $DIR/simplify_cfg.rs:7:18: 9:10 9 10 bb0: { 11- goto -> bb1; // bb0[0]: scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 12- } 13- 14- bb1: { 15- StorageLive(_2); // bb1[0]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 16- _2 = const bar() -> bb3; // bb1[1]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 17+ StorageLive(_2); // bb0[0]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 18+ _2 = const bar() -> bb1; // bb0[1]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 19 // ty::Const 20 // + ty: fn() -> bool {bar} 21 // + val: Value(Scalar(<ZST>)) 22 // mir::Constant 23 // + span: $DIR/simplify_cfg.rs:7:12: 7:15 24 // + literal: Const { ty: fn() -> bool {bar}, val: Value(Scalar(<ZST>)) } 25 } 26 27- bb2 (cleanup): { 28- resume; // bb2[0]: scope 0 at $DIR/simplify_cfg.rs:5:1: 11:2 29+ bb1: { 30+ switchInt(_2) -> [false: bb2, otherwise: bb3]; // bb1[0]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 31 } 32 33- bb3: { 34- nop; // bb3[0]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 35- switchInt(_2) -> [false: bb5, otherwise: bb4]; // bb3[1]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 36- } 37- 38- bb4: { 39- goto -> bb6; // bb4[0]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 40- } 41- 42- bb5: { 43- _1 = const (); // bb5[0]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 44+ bb2: { 45+ _1 = const (); // bb2[0]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 46 // ty::Const 47 // + ty: () 48 // + val: Value(Scalar(<ZST>)) 49 // mir::Constant 50 // + span: $DIR/simplify_cfg.rs:7:9: 9:10 51 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) } 52- StorageDead(_2); // bb5[1]: scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 53- goto -> bb0; // bb5[2]: scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 54+ StorageDead(_2); // bb2[1]: scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 55+ goto -> bb0; // bb2[2]: scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 56 } 57 58- bb6: { 59- _0 = const (); // bb6[0]: scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18 60+ bb3: { 61+ _0 = const (); // bb3[0]: scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18 62 // ty::Const 63 // + ty: () 64 // + val: Value(Scalar(<ZST>)) 65 // mir::Constant 66 // + span: $DIR/simplify_cfg.rs:8:13: 8:18 67 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) } 68- StorageDead(_2); // bb6[1]: scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 69- return; // bb6[2]: scope 0 at $DIR/simplify_cfg.rs:11:2: 11:2 70+ StorageDead(_2); // bb3[1]: scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 71+ return; // bb3[2]: scope 0 at $DIR/simplify_cfg.rs:11:2: 11:2 72 } 73 } 74