]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add debugging and stats output to numberlines
authorDavid Chase <drchase@google.com>
Thu, 2 May 2019 17:35:07 +0000 (13:35 -0400)
committerDavid Chase <drchase@google.com>
Thu, 16 May 2019 03:26:42 +0000 (03:26 +0000)
commitfba60669751a5362c43e3bdee8455bed3fa275b2
tree8984a0981070c2ccd4bfa20a3cfeae2aa1f2b63d
parentf2694534cf3591191a125815bae24cd12ea07022
cmd/compile: add debugging and stats output to numberlines

This is useful for debugging line number assignment and
also for making sense of pathological line number inputs.

Activated with
-gcflags=-d=ssa/number_lines/stats=1 (the bit matters)
-gcflags=-d=ssa/number_lines/debug

Stats:
"SUM_LINE_RANGE",
   SUM for f in files {MAX line in f {line}-MIN line in f {line}}
"MAXMIN_LINE_RANGE",
   MAX for f in files {MAX line in f {line}} -
   MIN for f in files {MIN line in f {line}}
"MAXFILE", maxfile,
   MAX for f in files {f}
"NFILES", len(entries)
   | files |

Change-Id: I8a7336e6370452fe2e3a62de17606db9bd6a6fd3
Reviewed-on: https://go-review.googlesource.com/c/go/+/174947
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/numberlines.go