fork/rust

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

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

1.44.0
11.8 KiB140 linesraw
1- // MIR for `main` before SimplifyLocals
2+ // MIR for `main` after SimplifyLocals
3  
4  fn main() -> () {
5      let mut _0: ();                      // return place in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:12:11: 12:11
6-     let mut _1: ((), ());                // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
7-     let mut _2: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
8-     let mut _3: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
9-     let _4: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
10-     let mut _5: ((), ());                // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
11-     let mut _6: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
12-     let mut _7: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
13-     let _8: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
14-     let mut _9: u8;                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:34
15-     let mut _10: u8;                     // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30
16-     let mut _11: Temp;                   // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
17+     let _1: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
18+     let _2: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
19      scope 1 {
20      }
21  
22      bb0: {
23-         StorageLive(_1);                 // bb0[0]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
24-         StorageLive(_2);                 // bb0[1]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
25-         _2 = const ();                   // bb0[2]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
26+         StorageLive(_1);                 // bb0[0]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
27+         _1 = const use_zst(const ((), ())) -> bb1; // bb0[1]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
28                                           // ty::Const
29-                                          // + ty: ()
30-                                          // + val: Value(Scalar(<ZST>))
31-                                          // mir::Constant
32-                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
33-                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
34-         StorageLive(_3);                 // bb0[3]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
35-         _3 = const ();                   // bb0[4]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
36-                                          // ty::Const
37-                                          // + ty: ()
38-                                          // + val: Value(Scalar(<ZST>))
39-                                          // mir::Constant
40-                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
41-                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
42-         _1 = const ((), ());             // bb0[5]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
43-                                          // ty::Const
44-                                          // + ty: ((), ())
45-                                          // + val: Value(Scalar(<ZST>))
46-                                          // mir::Constant
47-                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
48-                                          // + literal: Const { ty: ((), ()), val: Value(Scalar(<ZST>)) }
49-         StorageDead(_3);                 // bb0[6]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28
50-         StorageDead(_2);                 // bb0[7]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28
51-         StorageDead(_1);                 // bb0[8]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:28: 13:29
52-         StorageLive(_4);                 // bb0[9]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
53-         StorageLive(_6);                 // bb0[10]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
54-         _6 = const ();                   // bb0[11]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
55-                                          // ty::Const
56-                                          // + ty: ()
57-                                          // + val: Value(Scalar(<ZST>))
58-                                          // mir::Constant
59-                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
60-                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
61-         StorageLive(_7);                 // bb0[12]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
62-         _7 = const ();                   // bb0[13]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
63-                                          // ty::Const
64-                                          // + ty: ()
65-                                          // + val: Value(Scalar(<ZST>))
66-                                          // mir::Constant
67-                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
68-                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
69-         StorageDead(_7);                 // bb0[14]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21
70-         StorageDead(_6);                 // bb0[15]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21
71-         _4 = const use_zst(const ((), ())) -> bb1; // bb0[16]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
72-                                          // ty::Const
73                                           // + ty: fn(((), ())) {use_zst}
74                                           // + val: Value(Scalar(<ZST>))
75                                           // mir::Constant
76                                           // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:12
77                                           // + literal: Const { ty: fn(((), ())) {use_zst}, val: Value(Scalar(<ZST>)) }
78                                           // ty::Const
79                                           // + ty: ((), ())
80                                           // + val: Value(Scalar(<ZST>))
81                                           // mir::Constant
82                                           // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
83                                           // + literal: Const { ty: ((), ()), val: Value(Scalar(<ZST>)) }
84      }
85  
86      bb1: {
87-         StorageDead(_4);                 // bb1[0]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:22: 14:23
88-         StorageLive(_8);                 // bb1[1]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
89-         StorageLive(_10);                // bb1[2]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30
90-         StorageLive(_11);                // bb1[3]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
91-         _11 = const Temp { x: 40u8 };    // bb1[4]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
92+         StorageDead(_1);                 // bb1[0]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:22: 14:23
93+         StorageLive(_2);                 // bb1[1]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
94+         _2 = const use_u8(const 42u8) -> bb2; // bb1[2]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
95                                           // ty::Const
96-                                          // + ty: Temp
97-                                          // + val: Value(Scalar(0x28))
98-                                          // mir::Constant
99-                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
100-                                          // + literal: Const { ty: Temp, val: Value(Scalar(0x28)) }
101-         _10 = const 40u8;                // bb1[5]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30
102-                                          // ty::Const
103-                                          // + ty: u8
104-                                          // + val: Value(Scalar(0x28))
105-                                          // mir::Constant
106-                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30
107-                                          // + literal: Const { ty: u8, val: Value(Scalar(0x28)) }
108-         StorageDead(_10);                // bb1[6]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:33: 16:34
109-         _8 = const use_u8(const 42u8) -> bb2; // bb1[7]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
110-                                          // ty::Const
111                                           // + ty: fn(u8) {use_u8}
112                                           // + val: Value(Scalar(<ZST>))
113                                           // mir::Constant
114                                           // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:11
115                                           // + literal: Const { ty: fn(u8) {use_u8}, val: Value(Scalar(<ZST>)) }
116                                           // ty::Const
117                                           // + ty: u8
118                                           // + val: Value(Scalar(0x2a))
119                                           // mir::Constant
120                                           // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:34
121                                           // + literal: Const { ty: u8, val: Value(Scalar(0x2a)) }
122      }
123  
124      bb2: {
125-         StorageDead(_11);                // bb2[0]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
126-         StorageDead(_8);                 // bb2[1]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
127-         _0 = const ();                   // bb2[2]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2
128+         StorageDead(_2);                 // bb2[0]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
129+         _0 = const ();                   // bb2[1]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2
130                                           // ty::Const
131                                           // + ty: ()
132                                           // + val: Value(Scalar(<ZST>))
133                                           // mir::Constant
134                                           // + span: $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2
135                                           // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
136-         return;                          // bb2[3]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:17:2: 17:2
137+         return;                          // bb2[2]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:17:2: 17:2
138      }
139  }
140