[dev.ssa] cmd/compile: add HTML SSA printer

This is an initial implementation.
There are many rough edges and TODOs,
which will hopefully be polished out
with use.

Fixes #12071.

Change-Id: I1d6fd5a343063b5200623bceef2c2cfcc885794e
Reviewed-on: https://go-review.googlesource.com/13472
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2015-08-10 12:15:52 -07:00
parent 3e7904b648
commit 35fb514596
7 changed files with 607 additions and 45 deletions

View file

@ -34,13 +34,16 @@ func Compile(f *Func) {
// Run all the passes
printFunc(f)
f.Config.HTML.WriteFunc("start", f)
checkFunc(f)
for _, p := range passes {
phaseName = p.name
f.Logf(" pass %s begin\n", p.name)
// TODO: capture logging during this pass, add it to the HTML
p.fn(f)
f.Logf(" pass %s end\n", p.name)
printFunc(f)
f.Config.HTML.WriteFunc("after "+phaseName, f)
checkFunc(f)
}