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

Allow a unique name to be assigned to dataflow graphviz output #76724

Merged
merged 2 commits into from
Sep 25, 2020

Conversation

ecstatic-morse
Copy link
Contributor

Previously, if the same analysis were invoked multiple times in a single compilation session, the graphviz output for later runs would overwrite that of previous runs. Allow callers to add a unique identifier to each run so this can be avoided.

@rust-highfive
Copy link
Collaborator

r? @estebank

(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 Sep 15, 2020
@ecstatic-morse
Copy link
Contributor Author

r? @lcnr

There's not really much to this, and it would be helpful to have on master. Could someone review it?

@rust-highfive rust-highfive assigned lcnr and unassigned estebank Sep 23, 2020

let pass_name = pass_name.map(|s| format!(".{}", s)).unwrap_or_default();

path.push(format!("{}.{}.{}{}.dot", crate_name, item_name, A::NAME, pass_name));
Copy link
Contributor

Choose a reason for hiding this comment

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

So these changes change the output file to

myowncrate.itemname....

from

rustc.itemname...

I guess this is intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, pretty::dump_path was updated to include the crate name, so nothing else in the mir_dump directory uses rustc. However, I don't have a MirSource, and the format is not quite right, so this was easier.

@lcnr
Copy link
Contributor

lcnr commented Sep 24, 2020

😄

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 24, 2020

📌 Commit 0475c36 has been approved by lcnr

@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 Sep 24, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 25, 2020
…as-schievink

Rollup of 15 pull requests

Successful merges:

 - rust-lang#75438 (Use adaptive SVG favicon for rustdoc like other rust sites)
 - rust-lang#76304 (Make delegation methods of `std::net::IpAddr` unstably const)
 - rust-lang#76724 (Allow a unique name to be assigned to dataflow graphviz output)
 - rust-lang#76978 (Documented From impls in std/sync/mpsc/mod.rs)
 - rust-lang#77044 (Liballoc bench vec use mem take not replace)
 - rust-lang#77050 (Typo fix: "satsify" -> "satisfy")
 - rust-lang#77074 (add array::from_ref)
 - rust-lang#77078 (Don't use an if guard to check equality with a constant)
 - rust-lang#77079 (Use `Self` in docs when possible)
 - rust-lang#77081 (Merge two almost identical match arms)
 - rust-lang#77121 (Updated html_root_url for compiler crates)
 - rust-lang#77136 (Suggest `const_mut_refs`, not `const_fn` for mutable references in `const fn`)
 - rust-lang#77160 (Suggest `const_fn_transmute`, not `const_fn`)
 - rust-lang#77164 (Remove workaround for deref issue that no longer exists.)
 - rust-lang#77165 (Followup to rust-lang#76673)

Failed merges:

r? `@ghost`
@bors bors merged commit d766c23 into rust-lang:master Sep 25, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 25, 2020
@ecstatic-morse ecstatic-morse deleted the dataflow-pass-names branch October 6, 2020 01:42
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 9, 2020
… r=lcnr

Allow a unique name to be assigned to dataflow graphviz output

Previously, if the same analysis were invoked multiple times in a single compilation session, the graphviz output for later runs would overwrite that of previous runs. Allow callers to add a unique identifier to each run so this can be avoided.
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.

6 participants