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

Closed
josharian opened this issue Mar 10, 2020 · 8 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. UX Issues that involve UXD/UXR input
Milestone

Comments

@josharian
Copy link
Contributor

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
Copy link
Contributor Author

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

@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. UX Issues that involve UXD/UXR input labels Mar 10, 2020
@dmitshur dmitshur added this to the Backlog milestone Mar 10, 2020
@bradford-hamilton
Copy link
Contributor

@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
Copy link
Contributor Author

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
Copy link

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

@josharian
Copy link
Contributor Author

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

@bradford-hamilton
Copy link
Contributor

@josharian thanks! Sounds good to me.

@gopherbot
Copy link

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>
@randall77
Copy link
Contributor

I believe this is done.

@golang golang locked and limited conversation to collaborators Jun 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. UX Issues that involve UXD/UXR input
Projects
None yet
Development

No branches or pull requests

5 participants