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