Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
ecstatic-morse:graphviz-diff
Feb 17, 2020
Merged

Don't print block exit state in dataflow graphviz if unchanged#69158
bors merged 1 commit into
rust-lang:masterfrom
ecstatic-morse:graphviz-diff

Conversation

@ecstatic-morse

@ecstatic-morseecstatic-morse commented Feb 14, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

r? @matthewjasper

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 14, 2020
@matthewjasper

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Feb 15, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 5c473a0 has been approved by matthewjasper

@borsbors 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
Copy Markdown
ContributorAuthor

@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)
@JohnTitorJohnTitor mentioned this pull request Feb 17, 2020
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:masterFeb 17, 2020
@ecstatic-morse
ecstatic-morse deleted the graphviz-diff branch October 6, 2020 01:42
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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

@ecstatic-morse@rust-highfive@matthewjasper@bors