Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b08f051

Browse files
committedApr 30, 2024
Update dataflow.md to mention region graphs
1 parent 37d8612 commit b08f051

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
 

‎src/mir/dataflow.md

+15
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,21 @@ the example below:
217217

218218
![A graphviz diagram for a dataflow analysis](../img/dataflow-graphviz-example.png)
219219

220+
### Region Constraint Graphs and Their Strongly Connected Components
221+
222+
With `-Z dump-mir-graphviz=yes`, you will also get Graphviz files for the outlives constraints
223+
of the MIR bodies you asked for, as well as the strongly connected components (SCCs) on them.
224+
They are available as
225+
`mir_dump/rs-file-name.function-name.-------.nll.0.regioncx.all.dot` and
226+
`mir_dump/rs-file-name.function-name.-------.nll.0.regioncx.scc.dot` respectively. For both
227+
graphs, named region variables will be shown with their external name (such as `'static`)
228+
shown in parenthesis. For region inference variables in universes other than the root universe,
229+
they will be shown as `/U13` (for universe 13). In the region graph, edges are labelled with
230+
the MIR locations where the relationship holds.
231+
232+
**Note:** there are implicit edges from `'static` to every region, but those are not rendered
233+
in the region graph to avoid clutter. They *do* however show up in the SCC graph.
234+
220235
["gen-kill" problems]: https://en.wikipedia.org/wiki/Data-flow_analysis#Bit_vector_problems
221236
[*Static Program Analysis*]: https://cs.au.dk/~amoeller/spa/
222237
[Debugging MIR]: ./debugging.html

0 commit comments

Comments
 (0)
Please sign in to comment.