Skip to content

Conversation

ecstatic-morse
Copy link
Contributor

@ecstatic-morse ecstatic-morse commented Feb 14, 2020

A small quality-of-life improvement I was using while working on #68528. It's pretty common to have a lot of zero-statement basic blocks, especially before a SimplifyCfg pass is run. When the dataflow state was dense, these blocks could take up a lot of vertical space since the full flow state was printed on both entry and exit. After this PR, we only print a block's exit state if it differs from that block's entry state. Take a look at the two basic blocks on the left.

Before:

image

After:
image

@rust-highfive
Copy link
Contributor

r? @matthewjasper

(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 Feb 14, 2020
@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 15, 2020

📌 Commit 5c473a0 has been approved by matthewjasper

@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 Feb 15, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 15, 2020
…thewjasper

Don't print block exit state in dataflow graphviz if unchanged

A small quality-of-life improvement I was using while working on rust-lang#68528. It's pretty common to have a lot of zero-statement basic blocks, especially before a `SimplifyCfg` pass is run. When the dataflow state was dense, these blocks could take up a lot of vertical space since the full flow state was printed on both entry and exit. After this PR, we only print a block's exit state if it differs from that block's entry state. Take a look at the two basic blocks on the left.

Before:

![image](https://user-images.githubusercontent.com/29463364/74505395-e2d1dd00-4eab-11ea-8006-ec8f0dc9d1b6.png)

After:
![image](https://user-images.githubusercontent.com/29463364/74505277-98506080-4eab-11ea-8d95-5190bc378331.png)
@ecstatic-morse
Copy link
Contributor Author

@bors rollup=always

JohnTitor added a commit to JohnTitor/rust that referenced this pull request Feb 17, 2020
…thewjasper

Don't print block exit state in dataflow graphviz if unchanged

A small quality-of-life improvement I was using while working on rust-lang#68528. It's pretty common to have a lot of zero-statement basic blocks, especially before a `SimplifyCfg` pass is run. When the dataflow state was dense, these blocks could take up a lot of vertical space since the full flow state was printed on both entry and exit. After this PR, we only print a block's exit state if it differs from that block's entry state. Take a look at the two basic blocks on the left.

Before:

![image](https://user-images.githubusercontent.com/29463364/74505395-e2d1dd00-4eab-11ea-8006-ec8f0dc9d1b6.png)

After:
![image](https://user-images.githubusercontent.com/29463364/74505277-98506080-4eab-11ea-8d95-5190bc378331.png)
bors added a commit that referenced this pull request Feb 17, 2020
Rollup of 6 pull requests

Successful merges:

 - #68495 (Updating str.chars docs to mention crates.io.)
 - #68701 (Improve #Safety of various methods in core::ptr)
 - #69158 (Don't print block exit state in dataflow graphviz if unchanged)
 - #69179 (Rename `FunctionRetTy` to `FnRetTy`)
 - #69186 ([tiny] parser: `macro_rules` is a weak keyword)
 - #69188 (Clean up E0309 explanation)

Failed merges:

r? @ghost
@bors bors merged commit 5c473a0 into rust-lang:master Feb 17, 2020
@ecstatic-morse ecstatic-morse deleted the graphviz-diff 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