commit | 88b230eaa69647405e7c278044550640fc098111 | [log] [tgz] |
---|---|---|
author | David Chase <drchase@google.com> | Fri Jan 29 14:44:15 2016 -0500 |
committer | David Chase <drchase@google.com> | Fri Jan 29 21:30:29 2016 +0000 |
tree | 45b6484cc2f2901d85a25e9171ebd0cdb3163c1f | |
parent | f3575a9561319d2398ab01dd0375e0909e2f2aa8 [diff] [blame] |
[dev.ssa] cmd/compile: exposed do-log boolean to reduce allocations From memory profiling, about 3% reduction in allocation count. Change-Id: I4b662d55b8a94fe724759a2b22f05a08d0bf40f8 Reviewed-on: https://go-review.googlesource.com/19103 Reviewed-by: Keith Randall <khr@golang.org>
diff --git a/src/cmd/compile/internal/ssa/value.go b/src/cmd/compile/internal/ssa/value.go index 7e6e544..e338c44 100644 --- a/src/cmd/compile/internal/ssa/value.go +++ b/src/cmd/compile/internal/ssa/value.go
@@ -147,6 +147,7 @@ } func (v *Value) Logf(msg string, args ...interface{}) { v.Block.Logf(msg, args...) } +func (v *Value) Log() bool { return v.Block.Log() } func (v *Value) Fatalf(msg string, args ...interface{}) { v.Block.Func.Config.Fatalf(v.Line, msg, args...) }