This repository was archived by the owner on May 28, 2025. It is now read-only.
forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit fe4f400
authored
Unrolled build for rust-lang#129711
Rollup merge of rust-lang#129711 - lqd:nll-mir-dumps, r=compiler-errors
Expand NLL MIR dumps
This PR is a first step to clean up and expand NLL MIR dumps:
- by restoring the "mir-include-spans" comments which are useful for `-Zdump-mir=nll`
- by adding the list of borrows to NLL MIR dumps, where they are introduced in the CFG and in which region
Comments in MIR dumps were turned off in rust-lang#112346, but as shown in rust-lang#114652 they were still useful for us working with NLL MIR dumps. So this PR pulls `-Z mir-include-spans` into its own options struct, so that passes dumping MIR can override them if need be. The rest of the compiler is not affected, only the "nll" pass dumps have these comments enabled again. The CLI still has priority when specifying the flag, so that we can explicitly turn them off in the `mir-opt` tests to keep blessed dumps easier to work with (which was one of the points of rust-lang#112346).
Then, as part of a couple steps to improve NLL/polonius MIR dumps and `.dot` visualizations, I've also added the list of borrows and where they're introduced. I'm doing all this to help debug some polonius scope issues in my prototype location-sensitive analysis :3. I'll probably add member constraints soon.File tree
12 files changed
+214
-64
lines changed- compiler
- rustc_borrowck/src
- region_infer
- rustc_codegen_cranelift/src
- rustc_interface/src
- rustc_middle/src/mir
- rustc_session/src
- src/tools/compiletest/src
- tests/mir-opt
- nll
12 files changed
+214
-64
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
229 | 229 |
| |
230 | 230 |
| |
231 | 231 |
| |
232 | - | ||
232 | + | ||
233 | 233 |
| |
234 | 234 |
| |
235 | 235 |
| |
|
Lines changed: 67 additions & 27 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 | + | ||
12 | 13 |
| |
13 | 14 |
| |
14 | 15 |
| |
| |||
19 | 20 |
| |
20 | 21 |
| |
21 | 22 |
| |
23 | + | ||
22 | 24 |
| |
23 | 25 |
| |
24 | 26 |
| |
| |||
208 | 210 |
| |
209 | 211 |
| |
210 | 212 |
| |
211 | - | ||
213 | + | ||
214 | + | ||
215 | + | ||
216 | + | ||
217 | + | ||
218 | + | ||
219 | + | ||
220 | + | ||
221 | + | ||
222 | + | ||
212 | 223 |
| |
213 | 224 |
| |
214 | 225 |
| |
215 | 226 |
| |
227 | + | ||
216 | 228 |
| |
217 | - | ||
229 | + | ||
230 | + | ||
218 | 231 |
| |
219 | 232 |
| |
220 | 233 |
| |
221 | - | ||
222 | - | ||
223 | - | ||
224 | - | ||
225 | - | ||
226 | - | ||
227 | - | ||
228 | - | ||
229 | - | ||
230 | - | ||
231 | - | ||
232 | - | ||
233 | - | ||
234 | - | ||
234 | + | ||
235 | + | ||
236 | + | ||
237 | + | ||
238 | + | ||
239 | + | ||
240 | + | ||
241 | + | ||
242 | + | ||
243 | + | ||
244 | + | ||
245 | + | ||
246 | + | ||
247 | + | ||
248 | + | ||
249 | + | ||
250 | + | ||
251 | + | ||
252 | + | ||
253 | + | ||
235 | 254 |
| |
255 | + | ||
256 | + | ||
257 | + | ||
258 | + | ||
259 | + | ||
260 | + | ||
261 | + | ||
262 | + | ||
263 | + | ||
264 | + | ||
265 | + | ||
266 | + | ||
267 | + | ||
268 | + | ||
269 | + | ||
270 | + | ||
271 | + | ||
272 | + | ||
273 | + | ||
274 | + | ||
236 | 275 |
| |
237 | - | ||
238 | 276 |
| |
239 | - | ||
277 | + | ||
240 | 278 |
| |
241 | - | ||
279 | + | ||
242 | 280 |
| |
243 | - | ||
244 | - | ||
245 | - | ||
246 | - | ||
281 | + | ||
282 | + | ||
283 | + | ||
284 | + | ||
285 | + | ||
286 | + | ||
247 | 287 |
| |
248 | - | ||
288 | + | ||
249 | 289 |
| |
250 | - | ||
290 | + | ||
251 | 291 |
| |
252 | 292 |
| |
253 | 293 |
| |
254 | - | ||
294 | + | ||
255 | 295 |
| |
256 | - | ||
296 | + | ||
257 | 297 |
| |
258 | 298 |
| |
259 | 299 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
49 | - | ||
49 | + | ||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 | - | ||
48 | - | ||
47 | + | ||
48 | + | ||
49 | + | ||
49 | 50 |
| |
50 | 51 |
| |
51 | 52 |
| |
|
Lines changed: 5 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 | - | ||
16 | - | ||
17 | - | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
| |||
705 | 706 |
| |
706 | 707 |
| |
707 | 708 |
| |
708 | - | ||
709 | + | ||
709 | 710 |
| |
710 | 711 |
| |
711 | 712 |
| |
|
0 commit comments