fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
4.6 KiB80 linesraw
1// MIR for `while_loop` after PreCodegen
2
3fn while_loop(_1: bool) -> () {
4    debug c => _1;                       // in scope 0 at $DIR/while-storage.rs:9:15: 9:16
5    let mut _0: ();                      // return place in scope 0 at $DIR/while-storage.rs:9:24: 9:24
6    let mut _2: bool;                    // in scope 0 at $DIR/while-storage.rs:10:11: 10:22
7    let mut _3: bool;                    // in scope 0 at $DIR/while-storage.rs:10:20: 10:21
8    let mut _4: bool;                    // in scope 0 at $DIR/while-storage.rs:11:12: 11:23
9    let mut _5: bool;                    // in scope 0 at $DIR/while-storage.rs:11:21: 11:22
10
11    bb0: {
12        StorageLive(_2);                 // bb0[0]: scope 0 at $DIR/while-storage.rs:10:11: 10:22
13        StorageLive(_3);                 // bb0[1]: scope 0 at $DIR/while-storage.rs:10:20: 10:21
14        _3 = _1;                         // bb0[2]: scope 0 at $DIR/while-storage.rs:10:20: 10:21
15        _2 = const get_bool(move _3) -> bb1; // bb0[3]: scope 0 at $DIR/while-storage.rs:10:11: 10:22
16                                         // ty::Const
17                                         // + ty: fn(bool) -> bool {get_bool}
18                                         // + val: Value(Scalar(<ZST>))
19                                         // mir::Constant
20                                         // + span: $DIR/while-storage.rs:10:11: 10:19
21                                         // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(Scalar(<ZST>)) }
22    }
23
24    bb1: {
25        StorageDead(_3);                 // bb1[0]: scope 0 at $DIR/while-storage.rs:10:21: 10:22
26        switchInt(_2) -> [false: bb2, otherwise: bb3]; // bb1[1]: scope 0 at $DIR/while-storage.rs:10:5: 14:6
27    }
28
29    bb2: {
30        _0 = const ();                   // bb2[0]: scope 0 at $DIR/while-storage.rs:10:5: 14:6
31                                         // ty::Const
32                                         // + ty: ()
33                                         // + val: Value(Scalar(<ZST>))
34                                         // mir::Constant
35                                         // + span: $DIR/while-storage.rs:10:5: 14:6
36                                         // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
37        goto -> bb7;                     // bb2[1]: scope 0 at $DIR/while-storage.rs:10:5: 14:6
38    }
39
40    bb3: {
41        StorageLive(_4);                 // bb3[0]: scope 0 at $DIR/while-storage.rs:11:12: 11:23
42        StorageLive(_5);                 // bb3[1]: scope 0 at $DIR/while-storage.rs:11:21: 11:22
43        _5 = _1;                         // bb3[2]: scope 0 at $DIR/while-storage.rs:11:21: 11:22
44        _4 = const get_bool(move _5) -> bb4; // bb3[3]: scope 0 at $DIR/while-storage.rs:11:12: 11:23
45                                         // ty::Const
46                                         // + ty: fn(bool) -> bool {get_bool}
47                                         // + val: Value(Scalar(<ZST>))
48                                         // mir::Constant
49                                         // + span: $DIR/while-storage.rs:11:12: 11:20
50                                         // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(Scalar(<ZST>)) }
51    }
52
53    bb4: {
54        StorageDead(_5);                 // bb4[0]: scope 0 at $DIR/while-storage.rs:11:22: 11:23
55        switchInt(_4) -> [false: bb5, otherwise: bb6]; // bb4[1]: scope 0 at $DIR/while-storage.rs:11:9: 13:10
56    }
57
58    bb5: {
59        StorageDead(_4);                 // bb5[0]: scope 0 at $DIR/while-storage.rs:14:5: 14:6
60        StorageDead(_2);                 // bb5[1]: scope 0 at $DIR/while-storage.rs:10:21: 10:22
61        goto -> bb0;                     // bb5[2]: scope 0 at $DIR/while-storage.rs:10:5: 14:6
62    }
63
64    bb6: {
65        _0 = const ();                   // bb6[0]: scope 0 at $DIR/while-storage.rs:12:13: 12:18
66                                         // ty::Const
67                                         // + ty: ()
68                                         // + val: Value(Scalar(<ZST>))
69                                         // mir::Constant
70                                         // + span: $DIR/while-storage.rs:12:13: 12:18
71                                         // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
72        StorageDead(_4);                 // bb6[1]: scope 0 at $DIR/while-storage.rs:14:5: 14:6
73        goto -> bb7;                     // bb6[2]: scope 0 at $DIR/while-storage.rs:12:13: 12:18
74    }
75
76    bb7: {
77        StorageDead(_2);                 // bb7[0]: scope 0 at $DIR/while-storage.rs:10:21: 10:22
78        return;                          // bb7[1]: scope 0 at $DIR/while-storage.rs:15:2: 15:2
79    }
80}