aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/debug.go
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2018-10-10 16:08:24 -0400
committerDavid Chase <drchase@google.com>2018-10-11 15:29:00 +0000
commit69c5830c2b74b9bf0701352f2e5773227cb6f304 (patch)
tree27c15bd3ba8a9b3c46c6dd3a99a23ca79a502380 /src/cmd/compile/internal/ssa/debug.go
parentbac6a2925c50964e9387da5d37f2f23d4e5e7ac4 (diff)
downloadgo-69c5830c2b74b9bf0701352f2e5773227cb6f304.tar.gz
go-69c5830c2b74b9bf0701352f2e5773227cb6f304.zip
cmd/compile: repair display of values & blocks in prog column
This restores the printing of vXX and bYY in the left-hand edge of the last column of ssa.html, where the generated progs appear. Change-Id: I81ab9b2fa5ae28e6e5de1b77665cfbed8d14e000 Reviewed-on: https://go-review.googlesource.com/c/141277 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Yury Smolsky <yury@smolsky.by>
Diffstat (limited to 'src/cmd/compile/internal/ssa/debug.go')
-rw-r--r--src/cmd/compile/internal/ssa/debug.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/debug.go b/src/cmd/compile/internal/ssa/debug.go
index c1fbdcc517..8df8a94b76 100644
--- a/src/cmd/compile/internal/ssa/debug.go
+++ b/src/cmd/compile/internal/ssa/debug.go
@@ -153,8 +153,12 @@ var BlockEnd = &Value{
// RegisterSet is a bitmap of registers, indexed by Register.num.
type RegisterSet uint64
+// logf prints debug-specific logging to stdout (always stdout) if the current
+// function is tagged by GOSSAFUNC (for ssa output directed either to stdout or html).
func (s *debugState) logf(msg string, args ...interface{}) {
- s.f.Logf(msg, args...)
+ if s.f.PrintOrHtmlSSA {
+ fmt.Printf(msg, args...)
+ }
}
type debugState struct {