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