-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elaborate on dataflow outputs for region constraints #1969
base: master
Are you sure you want to change the base?
Conversation
Add a hint about unflatten and an internal link to MIR outlives graphs to advertise them better.
I see Zed snuck in some Markdown normalisation too while it was at it. Sorry about that, let me know if that's inexcusable and I will revert those changes. |
Please do yes, if it's not too hard. It will make review easier. I'll take a closer look when I have more time, but I noted a couple of things:
|
Done!
Huh! Apparently,
That's probably true; this should be in the borrowck chapter, maybe? Do you have a suggestion off the top of your head or should I go digging? |
Not from the top of my head but I will look for one -- but yeah I agree this should be in the borrowck chapter most likely. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Sorry for taking so long to get back to this.)
So since these are not dataflow outputs, I agree we should add it to the borrow_check
chapter.
To do so, I think we should add a dedicated borrow_check/debugging.md
page, and have the "Region constraint graphs and their SCCs" section there. We would mention that these come from -Zdump-mir=nll
-- and that will give us the occasion to also describe the NLL dumps there in the future.
We can link to that page from the bottom of src/borrow_check.md
instead of src/compiler-debugging.md
(but we can leave the unflatten
paragraph there, it's a good addition next to the graphviz section).
Co-authored-by: Rémy Rakic <[email protected]>
Co-authored-by: Rémy Rakic <[email protected]>
|
||
## See also | ||
|
||
The [general instructions on debugging dataflow]() also apply to graphs generated from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The [general instructions on debugging dataflow]() also apply to graphs generated from | |
The [general instructions on debugging dataflow](../mir/dataflow.md) also apply to graphs generated from |
![A graph showing a small number of strongly connected components on the region-outlives-graph above](../img/scc-graphviz.png) | ||
|
||
**Note:** There are implicit edges from `'static` to every region, but those are not rendered | ||
in the region graph to avoid clutter. They _do_ however show up in the SCC graph. This is why there are outgoing edges from `SCC(5)` in the SCC graph that do not seem to have corresponding edges in the region outlives graph above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line will need to be wrapped as well.
This is particularly useful for complicated region outlives graphs from | ||
[MIR Dataflow](mir/dataflow.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is particularly useful for complicated region outlives graphs from | |
[MIR Dataflow](mir/dataflow.md). | |
This is particularly useful for complicated region outlives graphs from | |
[the borrow checker](borrow_check/debugging.md). |
@lqd btw, you can also edit @amandasystems's branch directly for trivial things like fixing links. We can also try to get this merged so it doesn't drown from merge conflicts. And it's perfectly fine if it still has inaccuracies/omissions, we can always follow-up, it's just docs after all! |
No description provided.