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

cmd/compile: automatically combine passes in ssa.html when contents are unchanged #37766

Open
josharian opened this issue Mar 10, 2020 · 7 comments
Open

Comments

@josharian
Copy link
Contributor

@josharian josharian commented Mar 10, 2020

ssa.html has a lot of columns. It'd help both the user and the browser if we could eliminate some of them.

Some passes have no impact at all on the function (e.g. arch specific passes on other architectures, or the writebarrier pass on a function with no pointer writes).

I suggest that the SSA HTML writer hash the function contents, maybe just by printing the function using stringFuncPrinter into a hash.Hash. Then, if a pass has had no impact, combine the two columns. So instead of a "generic cse" column followed by a "phiopt" column, we'd have a single column called something like "generic cse = phiopt" (and maybe more than two).

The expandedDefault array may need tweaking to support this.

cc @randall77 @bradford-hamilton

@josharian

This comment has been minimized.

Copy link
Contributor Author

@josharian josharian commented Mar 10, 2020

@bradford-hamilton feel 100% free to ignore this. I'm only cc'ing you optimistically. :)

@dmitshur dmitshur added this to the Backlog milestone Mar 10, 2020
@bradford-hamilton

This comment has been minimized.

Copy link
Contributor

@bradford-hamilton bradford-hamilton commented Mar 10, 2020

@josharian I like this idea a lot - I think I'll look into it a bit and see what I can come up with. If anyone else has interest or more context here and wants to claim it feel free! Think I'll try it either way for the learns.

@josharian

This comment has been minimized.

Copy link
Contributor Author

@josharian josharian commented Mar 10, 2020

I played with this a tiny bit after filing the issue. I have a sketch of it along with quite a few TODOs left. I’d love for you to get it over the finish line! I’ll put my WIP up somewhere a bit later for you.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Mar 10, 2020

Change https://golang.org/cl/222777 mentions this issue: cmd/compile: combine ssa.html columns with identical contents

@josharian

This comment has been minimized.

Copy link
Contributor Author

@josharian josharian commented Mar 10, 2020

@bradford-hamilton all yours, unless/until I hear otherwise from you. :)

@bradford-hamilton

This comment has been minimized.

Copy link
Contributor

@bradford-hamilton bradford-hamilton commented Mar 10, 2020

@josharian thanks! Sounds good to me.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Mar 29, 2020

Change https://golang.org/cl/226209 mentions this issue: cmd/compile: combine ssa.html columns with identical contents

gopherbot pushed a commit that referenced this issue Apr 1, 2020
Combine columns in ssa.html output if they are identical. There
can now be multiple titles per column which are all clickable to
expand and collapse their column. Give collapsed columns some
padding for better readability. Some of the work in this CL was
started by Josh Bleecher Snyder and mailed to me in order to
continue to completion.

Updates #37766

Change-Id: I313b0917dc1bafe1eb99d91798ea915e5bcfaae9
Reviewed-on: https://go-review.googlesource.com/c/go/+/226209
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.