]> git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir
New upstream version 1.53.0+dfsg1
[rustc.git] / src / test / mir-opt / retag.main.SimplifyCfg-elaborate-drops.after.mir
1 // MIR for `main` after SimplifyCfg-elaborate-drops
2
3 fn main() -> () {
4 let mut _0: (); // return place in scope 0 at $DIR/retag.rs:29:11: 29:11
5 let mut _1: i32; // in scope 0 at $DIR/retag.rs:30:9: 30:14
6 let _2: (); // in scope 0 at $DIR/retag.rs:31:5: 37:6
7 let mut _4: &Test; // in scope 0 at $DIR/retag.rs:32:17: 32:24
8 let _5: Test; // in scope 0 at $DIR/retag.rs:32:17: 32:24
9 let mut _6: &mut i32; // in scope 0 at $DIR/retag.rs:32:29: 32:35
10 let mut _7: &mut i32; // in scope 0 at $DIR/retag.rs:32:29: 32:35
11 let mut _9: &mut i32; // in scope 0 at $DIR/retag.rs:33:19: 33:20
12 let mut _12: *mut i32; // in scope 0 at $DIR/retag.rs:36:18: 36:29
13 let mut _14: [closure@main::{closure#0}]; // in scope 0 at $DIR/retag.rs:40:31: 43:6
14 let mut _16: for<'r> fn(&'r i32) -> &'r i32; // in scope 0 at $DIR/retag.rs:44:14: 44:15
15 let mut _17: &i32; // in scope 0 at $DIR/retag.rs:44:16: 44:18
16 let _18: &i32; // in scope 0 at $DIR/retag.rs:44:16: 44:18
17 let _19: &i32; // in scope 0 at $DIR/retag.rs:47:5: 47:24
18 let mut _20: &Test; // in scope 0 at $DIR/retag.rs:47:5: 47:12
19 let _21: Test; // in scope 0 at $DIR/retag.rs:47:5: 47:12
20 let mut _22: &i32; // in scope 0 at $DIR/retag.rs:47:21: 47:23
21 let _23: &i32; // in scope 0 at $DIR/retag.rs:47:21: 47:23
22 let _24: i32; // in scope 0 at $DIR/retag.rs:47:22: 47:23
23 let mut _26: *const i32; // in scope 0 at $DIR/retag.rs:50:14: 50:28
24 scope 1 {
25 debug x => _1; // in scope 1 at $DIR/retag.rs:30:9: 30:14
26 let _3: &mut i32; // in scope 1 at $DIR/retag.rs:32:13: 32:14
27 let _13: for<'r> fn(&'r i32) -> &'r i32; // in scope 1 at $DIR/retag.rs:40:9: 40:10
28 scope 2 {
29 debug v => _3; // in scope 2 at $DIR/retag.rs:32:13: 32:14
30 let _8: &mut i32; // in scope 2 at $DIR/retag.rs:33:13: 33:14
31 scope 3 {
32 debug w => _8; // in scope 3 at $DIR/retag.rs:33:13: 33:14
33 let _10: &mut i32; // in scope 3 at $DIR/retag.rs:34:13: 34:14
34 scope 4 {
35 debug w => _10; // in scope 4 at $DIR/retag.rs:34:13: 34:14
36 let _11: *mut i32; // in scope 4 at $DIR/retag.rs:36:13: 36:15
37 scope 5 {
38 debug _w => _11; // in scope 5 at $DIR/retag.rs:36:13: 36:15
39 }
40 }
41 }
42 }
43 scope 6 {
44 debug c => _13; // in scope 6 at $DIR/retag.rs:40:9: 40:10
45 let _15: &i32; // in scope 6 at $DIR/retag.rs:44:9: 44:11
46 scope 7 {
47 debug _w => _15; // in scope 7 at $DIR/retag.rs:44:9: 44:11
48 let _25: *const i32; // in scope 7 at $DIR/retag.rs:50:9: 50:11
49 let mut _27: &i32; // in scope 7 at $DIR/retag.rs:47:21: 47:23
50 scope 8 {
51 debug _w => _25; // in scope 8 at $DIR/retag.rs:50:9: 50:11
52 }
53 }
54 }
55 }
56
57 bb0: {
58 StorageLive(_1); // scope 0 at $DIR/retag.rs:30:9: 30:14
59 _1 = const 0_i32; // scope 0 at $DIR/retag.rs:30:17: 30:18
60 StorageLive(_2); // scope 1 at $DIR/retag.rs:31:5: 37:6
61 StorageLive(_3); // scope 1 at $DIR/retag.rs:32:13: 32:14
62 StorageLive(_4); // scope 1 at $DIR/retag.rs:32:17: 32:24
63 StorageLive(_5); // scope 1 at $DIR/retag.rs:32:17: 32:24
64 _5 = Test(const 0_i32); // scope 1 at $DIR/retag.rs:32:17: 32:24
65 _4 = &_5; // scope 1 at $DIR/retag.rs:32:17: 32:24
66 Retag(_4); // scope 1 at $DIR/retag.rs:32:17: 32:24
67 StorageLive(_6); // scope 1 at $DIR/retag.rs:32:29: 32:35
68 StorageLive(_7); // scope 1 at $DIR/retag.rs:32:29: 32:35
69 _7 = &mut _1; // scope 1 at $DIR/retag.rs:32:29: 32:35
70 Retag(_7); // scope 1 at $DIR/retag.rs:32:29: 32:35
71 _6 = &mut (*_7); // scope 1 at $DIR/retag.rs:32:29: 32:35
72 Retag([2phase] _6); // scope 1 at $DIR/retag.rs:32:29: 32:35
73 _3 = Test::foo(move _4, move _6) -> [return: bb1, unwind: bb7]; // scope 1 at $DIR/retag.rs:32:17: 32:36
74 // mir::Constant
75 // + span: $DIR/retag.rs:32:25: 32:28
76 // + literal: Const { ty: for<'r, 'x> fn(&'r Test, &'x mut i32) -> &'x mut i32 {Test::foo}, val: Value(Scalar(<ZST>)) }
77 }
78
79 bb1: {
80 Retag(_3); // scope 1 at $DIR/retag.rs:32:17: 32:36
81 StorageDead(_6); // scope 1 at $DIR/retag.rs:32:35: 32:36
82 StorageDead(_4); // scope 1 at $DIR/retag.rs:32:35: 32:36
83 StorageDead(_7); // scope 1 at $DIR/retag.rs:32:36: 32:37
84 drop(_5) -> [return: bb2, unwind: bb8]; // scope 1 at $DIR/retag.rs:32:36: 32:37
85 }
86
87 bb2: {
88 StorageDead(_5); // scope 1 at $DIR/retag.rs:32:36: 32:37
89 StorageLive(_8); // scope 2 at $DIR/retag.rs:33:13: 33:14
90 StorageLive(_9); // scope 2 at $DIR/retag.rs:33:19: 33:20
91 _9 = move _3; // scope 2 at $DIR/retag.rs:33:19: 33:20
92 Retag(_9); // scope 2 at $DIR/retag.rs:33:19: 33:20
93 _8 = &mut (*_9); // scope 2 at $DIR/retag.rs:33:19: 33:20
94 Retag(_8); // scope 2 at $DIR/retag.rs:33:19: 33:20
95 StorageDead(_9); // scope 2 at $DIR/retag.rs:33:22: 33:23
96 StorageLive(_10); // scope 3 at $DIR/retag.rs:34:13: 34:14
97 _10 = move _8; // scope 3 at $DIR/retag.rs:34:17: 34:18
98 Retag(_10); // scope 3 at $DIR/retag.rs:34:17: 34:18
99 StorageLive(_11); // scope 4 at $DIR/retag.rs:36:13: 36:15
100 StorageLive(_12); // scope 4 at $DIR/retag.rs:36:18: 36:29
101 _12 = &raw mut (*_10); // scope 4 at $DIR/retag.rs:36:18: 36:19
102 Retag([raw] _12); // scope 4 at $DIR/retag.rs:36:18: 36:19
103 _11 = _12; // scope 4 at $DIR/retag.rs:36:18: 36:29
104 StorageDead(_12); // scope 4 at $DIR/retag.rs:36:29: 36:30
105 _2 = const (); // scope 1 at $DIR/retag.rs:31:5: 37:6
106 StorageDead(_11); // scope 4 at $DIR/retag.rs:37:5: 37:6
107 StorageDead(_10); // scope 3 at $DIR/retag.rs:37:5: 37:6
108 StorageDead(_8); // scope 2 at $DIR/retag.rs:37:5: 37:6
109 StorageDead(_3); // scope 1 at $DIR/retag.rs:37:5: 37:6
110 StorageDead(_2); // scope 1 at $DIR/retag.rs:37:5: 37:6
111 StorageLive(_13); // scope 1 at $DIR/retag.rs:40:9: 40:10
112 StorageLive(_14); // scope 1 at $DIR/retag.rs:40:31: 43:6
113 _14 = [closure@main::{closure#0}]; // scope 1 at $DIR/retag.rs:40:31: 43:6
114 // closure
115 // + def_id: DefId(0:14 ~ retag[317d]::main::{closure#0})
116 // + substs: [
117 // i8,
118 // for<'r> extern "rust-call" fn((&'r i32,)) -> &'r i32,
119 // (),
120 // ]
121 Retag(_14); // scope 1 at $DIR/retag.rs:40:31: 43:6
122 _13 = move _14 as for<'r> fn(&'r i32) -> &'r i32 (Pointer(ClosureFnPointer(Normal))); // scope 1 at $DIR/retag.rs:40:31: 43:6
123 StorageDead(_14); // scope 1 at $DIR/retag.rs:43:5: 43:6
124 StorageLive(_15); // scope 6 at $DIR/retag.rs:44:9: 44:11
125 StorageLive(_16); // scope 6 at $DIR/retag.rs:44:14: 44:15
126 _16 = _13; // scope 6 at $DIR/retag.rs:44:14: 44:15
127 StorageLive(_17); // scope 6 at $DIR/retag.rs:44:16: 44:18
128 StorageLive(_18); // scope 6 at $DIR/retag.rs:44:16: 44:18
129 _18 = &_1; // scope 6 at $DIR/retag.rs:44:16: 44:18
130 Retag(_18); // scope 6 at $DIR/retag.rs:44:16: 44:18
131 _17 = &(*_18); // scope 6 at $DIR/retag.rs:44:16: 44:18
132 Retag(_17); // scope 6 at $DIR/retag.rs:44:16: 44:18
133 _15 = move _16(move _17) -> bb3; // scope 6 at $DIR/retag.rs:44:14: 44:19
134 }
135
136 bb3: {
137 Retag(_15); // scope 6 at $DIR/retag.rs:44:14: 44:19
138 StorageDead(_17); // scope 6 at $DIR/retag.rs:44:18: 44:19
139 StorageDead(_16); // scope 6 at $DIR/retag.rs:44:18: 44:19
140 StorageDead(_18); // scope 6 at $DIR/retag.rs:44:19: 44:20
141 StorageLive(_19); // scope 7 at $DIR/retag.rs:47:5: 47:24
142 StorageLive(_20); // scope 7 at $DIR/retag.rs:47:5: 47:12
143 StorageLive(_21); // scope 7 at $DIR/retag.rs:47:5: 47:12
144 _21 = Test(const 0_i32); // scope 7 at $DIR/retag.rs:47:5: 47:12
145 _20 = &_21; // scope 7 at $DIR/retag.rs:47:5: 47:12
146 Retag(_20); // scope 7 at $DIR/retag.rs:47:5: 47:12
147 StorageLive(_22); // scope 7 at $DIR/retag.rs:47:21: 47:23
148 StorageLive(_23); // scope 7 at $DIR/retag.rs:47:21: 47:23
149 _27 = const main::promoted[0]; // scope 7 at $DIR/retag.rs:47:21: 47:23
150 // ty::Const
151 // + ty: &i32
152 // + val: Unevaluated(main, [], Some(promoted[0]))
153 // mir::Constant
154 // + span: $DIR/retag.rs:47:21: 47:23
155 // + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:13 ~ retag[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
156 Retag(_27); // scope 7 at $DIR/retag.rs:47:21: 47:23
157 _23 = &(*_27); // scope 7 at $DIR/retag.rs:47:21: 47:23
158 Retag(_23); // scope 7 at $DIR/retag.rs:47:21: 47:23
159 _22 = &(*_23); // scope 7 at $DIR/retag.rs:47:21: 47:23
160 Retag(_22); // scope 7 at $DIR/retag.rs:47:21: 47:23
161 _19 = Test::foo_shr(move _20, move _22) -> [return: bb4, unwind: bb6]; // scope 7 at $DIR/retag.rs:47:5: 47:24
162 // mir::Constant
163 // + span: $DIR/retag.rs:47:13: 47:20
164 // + literal: Const { ty: for<'r, 'x> fn(&'r Test, &'x i32) -> &'x i32 {Test::foo_shr}, val: Value(Scalar(<ZST>)) }
165 }
166
167 bb4: {
168 Retag(_19); // scope 7 at $DIR/retag.rs:47:5: 47:24
169 StorageDead(_22); // scope 7 at $DIR/retag.rs:47:23: 47:24
170 StorageDead(_20); // scope 7 at $DIR/retag.rs:47:23: 47:24
171 StorageDead(_23); // scope 7 at $DIR/retag.rs:47:24: 47:25
172 drop(_21) -> [return: bb5, unwind: bb8]; // scope 7 at $DIR/retag.rs:47:24: 47:25
173 }
174
175 bb5: {
176 StorageDead(_21); // scope 7 at $DIR/retag.rs:47:24: 47:25
177 StorageDead(_19); // scope 7 at $DIR/retag.rs:47:24: 47:25
178 StorageLive(_25); // scope 7 at $DIR/retag.rs:50:9: 50:11
179 StorageLive(_26); // scope 7 at $DIR/retag.rs:50:14: 50:28
180 _26 = &raw const (*_15); // scope 7 at $DIR/retag.rs:50:14: 50:16
181 Retag([raw] _26); // scope 7 at $DIR/retag.rs:50:14: 50:16
182 _25 = _26; // scope 7 at $DIR/retag.rs:50:14: 50:28
183 StorageDead(_26); // scope 7 at $DIR/retag.rs:50:28: 50:29
184 _0 = const (); // scope 0 at $DIR/retag.rs:29:11: 51:2
185 StorageDead(_25); // scope 7 at $DIR/retag.rs:51:1: 51:2
186 StorageDead(_15); // scope 6 at $DIR/retag.rs:51:1: 51:2
187 StorageDead(_13); // scope 1 at $DIR/retag.rs:51:1: 51:2
188 StorageDead(_1); // scope 0 at $DIR/retag.rs:51:1: 51:2
189 return; // scope 0 at $DIR/retag.rs:51:2: 51:2
190 }
191
192 bb6 (cleanup): {
193 drop(_21) -> bb8; // scope 7 at $DIR/retag.rs:47:24: 47:25
194 }
195
196 bb7 (cleanup): {
197 drop(_5) -> bb8; // scope 1 at $DIR/retag.rs:32:36: 32:37
198 }
199
200 bb8 (cleanup): {
201 resume; // scope 0 at $DIR/retag.rs:29:1: 51:2
202 }
203 }