cmd/compile: debug rewrite

If -d=ssa/PASS/debug=N is specified (N >= 2) for a rewrite pass
(e.g. lower), when a Value (or Block) is rewritten, print the
Value (or Block) before and after.

For #31915.
Updates #19013.

Change-Id: I80eadd44302ae736bc7daed0ef68529ab7a16776
Reviewed-on: https://go-review.googlesource.com/c/go/+/176718
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Cherry Zhang 2020-01-24 10:43:09 -05:00
parent 6d63a74f8e
commit 1b15c7f102
2 changed files with 35 additions and 4 deletions

View file

@ -1,4 +1,4 @@
// errorcheck -0 -d=ssa/opt/debug=3
// errorcheck -0 -d=ssa/opt/debug=1
package main