aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/print.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2015-07-10 12:58:53 -0600
committerBrad Fitzpatrick <bradfitz@golang.org>2015-07-13 04:08:16 +0000
commite81671115c0857d3286e9331870ec9993e81a1a7 (patch)
tree3143e7d42a42a9ba21b835361688bedb048c615a /src/cmd/compile/internal/ssa/print.go
parent7e4c06dad065d1440fe8fcfa8e97702c88e1374e (diff)
downloadgo-e81671115c0857d3286e9331870ec9993e81a1a7.tar.gz
go-e81671115c0857d3286e9331870ec9993e81a1a7.zip
[dev.ssa] cmd/compile: OANDAND, OOROR
Joint hacking with josharian. Hints from matloob and Todd Neal. Now with tests, and OROR. Change-Id: Iff8826fde475691fb72a3eea7396a640b6274af9 Reviewed-on: https://go-review.googlesource.com/12041 Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/print.go')
-rw-r--r--src/cmd/compile/internal/ssa/print.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/print.go b/src/cmd/compile/internal/ssa/print.go
index 14d88dccd5..c8b90c6f93 100644
--- a/src/cmd/compile/internal/ssa/print.go
+++ b/src/cmd/compile/internal/ssa/print.go
@@ -26,7 +26,14 @@ func fprintFunc(w io.Writer, f *Func) {
fmt.Fprintln(w, f.Type)
printed := make([]bool, f.NumValues())
for _, b := range f.Blocks {
- fmt.Fprintf(w, " b%d:\n", b.ID)
+ fmt.Fprintf(w, " b%d:", b.ID)
+ if len(b.Preds) > 0 {
+ io.WriteString(w, " <-")
+ for _, pred := range b.Preds {
+ fmt.Fprintf(w, " b%d", pred.ID)
+ }
+ }
+ io.WriteString(w, "\n")
n := 0
// print phis first since all value cycles contain a phi