Skip to content
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

Add -Z dump-mir-dataflow flag for dumping dataflow results visualization #70511

Merged
merged 4 commits into from
Apr 1, 2020

Conversation

ecstatic-morse
Copy link
Contributor

@ecstatic-morse ecstatic-morse commented Mar 28, 2020

Previously, to visualize the results of a MIR dataflow pass, one had to add a #[rustc_mir(borrowck_graphviz_postflow)] attribute to functions of interest. However, there is no way to specify this attribute on closures and generators, so it was impossible to view results for these MIR bodies.

This PR adds a flag, -Z dump-mir-dataflow, which will output the dataflow results for any functions specified in -Z dump-mir to the output directory specified by -Z dump-mir-dir. This behavior is modeled on the -Z dump-mir-graphviz flag.

@rust-highfive
Copy link
Collaborator

r? @davidtwco

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 28, 2020
Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 31, 2020

📌 Commit 4d1194c has been approved by davidtwco

@bors
Copy link
Contributor

bors commented Mar 31, 2020

🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 31, 2020
Centril added a commit to Centril/rust that referenced this pull request Apr 1, 2020
…z, r=davidtwco

Add `-Z dump-mir-dataflow` flag for dumping dataflow results visualization

Previously, to visualize the results of a MIR dataflow pass, one had to add a `#[rustc_mir(borrowck_graphviz_postflow)]` attribute to functions of interest. However, there is no way to specify this attribute on closures and generators, so it was impossible to view results for these MIR bodies.

This PR adds a flag, `-Z dump-mir-dataflow`, which will output the dataflow results for any functions specified in `-Z dump-mir` to the output directory specified by `-Z dump-mir-dir`. This behavior is modeled on the `-Z dump-mir-graphviz` flag.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 1, 2020
Rollup of 6 pull requests

Successful merges:

 - rust-lang#70511 (Add `-Z dump-mir-dataflow` flag for dumping dataflow results visualization)
 - rust-lang#70522 (Improve error messages for raw strings (rust-lang#60762))
 - rust-lang#70547 (Add `can_unwind` field to `FnAbi`)
 - rust-lang#70591 (Ensure LLVM is in the link path for "fulldeps" tests)
 - rust-lang#70627 (Use place directly its copy)
 - rust-lang#70652 (Add git repo address to unstable book)

Failed merges:

 - rust-lang#70634 (Remove some reexports in `rustc_middle`)

r? @ghost
@bors bors merged commit 84a4633 into rust-lang:master Apr 1, 2020
@ecstatic-morse ecstatic-morse deleted the mir-dataflow-graphviz branch October 6, 2020 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants