Skip to content

Commit 37d8612

Browse files
committed
Update compiler-debugging.md
Add a hint about unflatten and an internal link to MIR outlives graphs to advertise them better.
1 parent 4c97ad5 commit 37d8612

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: src/compiler-debugging.md

+12
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,18 @@ $ dot -T pdf maybe_init_suffix.dot > maybe_init_suffix.pdf
244244
$ firefox maybe_init_suffix.pdf # Or your favorite pdf viewer
245245
```
246246

247+
Graphviz also comes with a preprocessor program,
248+
[`unflatten`](https://graphviz.org/docs/cli/unflatten/), that
249+
sometimes helps making the outputs look less oddly spread out. It reads
250+
a dot file and outputs another dot file, so you can use it in a pipe,
251+
e.g:
252+
```
253+
$ unflatten mir_dump/*.foo.-------.nll.0.regioncx.all.dot | dot -Tpdf -o foo-outlives.pdf
254+
```
255+
256+
This is particularly useful for complicated region outlives graphs from
257+
[MIR Dataflow](mir/dataflow.md#graphviz-diagrams).
258+
247259
## Narrowing (Bisecting) Regressions
248260

249261
The [cargo-bisect-rustc][bisect] tool can be used as a quick and easy way to

0 commit comments

Comments
 (0)