From: Josh Bleecher Snyder Date: Fri, 10 May 2019 23:31:56 +0000 (-0700) Subject: cmd/compile: reduce rulelog noise X-Git-Tag: go1.13beta1~333 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f61cf6f3138d47e1e72dbd56c12e7d1f3314a813;p=gostls13.git cmd/compile: reduce rulelog noise When the SSA rules are re-generated to log rules, they write output like: rewrite AMD64.rules:527 rewrite AMD64.rules:427 rewrite AMD64.rules:494 This is silly; there are no non-rewrite lines in the file. Furthermore, the rulelog file tends to be gigantic for any non-trivial compilation (measured in gigabytes). Remove the "rewrite " prefix. No impact to normal builds. Change-Id: I955995c1cc5f27a4a6a3849e19082ecb3e40bd4f Reviewed-on: https://go-review.googlesource.com/c/go/+/176677 Run-TryBot: Josh Bleecher Snyder Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/compile/internal/ssa/rewrite.go b/src/cmd/compile/internal/ssa/rewrite.go index 18d9c9f985..c6b0fa38f3 100644 --- a/src/cmd/compile/internal/ssa/rewrite.go +++ b/src/cmd/compile/internal/ssa/rewrite.go @@ -868,7 +868,7 @@ func logRule(s string) { } ruleFile = w } - _, err := fmt.Fprintf(ruleFile, "rewrite %s\n", s) + _, err := fmt.Fprintln(ruleFile, s) if err != nil { panic(err) }