diff options
author | Josh Bleecher Snyder <josharian@gmail.com> | 2020-03-07 13:36:36 -0800 |
---|---|---|
committer | Josh Bleecher Snyder <josharian@gmail.com> | 2020-03-11 11:47:34 +0000 |
commit | c6fef1fb52e9660ce2226a19508fdaacf71e46a9 (patch) | |
tree | 783a5be75c5ab7f225e125483b17bf4c86467137 /src/cmd/compile/internal/ssa/html.go | |
parent | 6bed304244493508191501ad63fdc74b41e19653 (diff) | |
download | go-c6fef1fb52e9660ce2226a19508fdaacf71e46a9.tar.gz go-c6fef1fb52e9660ce2226a19508fdaacf71e46a9.zip |
cmd/compile: improve CFG size in ssa.html
This change forces CFGs to take the full width of their column
and allows them to be as tall as necessary.
In my (recent) experience, this makes them far less likely to
be cropped, which makes them much more useful.
On rare occasions, this can lead to gigantic CFGs,
but if you've bothered to explicitly request a CFG,
this is still better than an irrevocably truncated CFG.
Change-Id: I9a649ea57fa3c2792998bb71331a2580e429b36a
Reviewed-on: https://go-review.googlesource.com/c/go/+/222618
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/html.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/html.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/html.go b/src/cmd/compile/internal/ssa/html.go index c384817d0c..54fa54a477 100644 --- a/src/cmd/compile/internal/ssa/html.go +++ b/src/cmd/compile/internal/ssa/html.go @@ -245,6 +245,7 @@ dd.ssa-prog { svg { cursor: default; outline: 1px solid #eee; + width: 100%; } body.darkmode { @@ -975,7 +976,7 @@ func (d *dotWriter) writeFuncSVG(w io.Writer, phase string, f *Func) { fmt.Println(err) return } - fmt.Fprint(pipe, `digraph "" { margin=0; size="4,40"; ranksep=.2; `) + fmt.Fprint(pipe, `digraph "" { margin=0; ranksep=.2; `) id := strings.Replace(phase, " ", "-", -1) fmt.Fprintf(pipe, `id="g_graph_%s";`, id) fmt.Fprintf(pipe, `node [style=filled,fillcolor=white,fontsize=16,fontname="Menlo,Times,serif",margin="0.01,0.03"];`) |