From: Todd Neal Date: Tue, 15 Mar 2016 02:59:20 +0000 (-0500) Subject: cmd/compile: add logging to critical and phielim X-Git-Tag: go1.7beta1~1310 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8edb72587f500a1afcd0209a3c18310eafe95e08;p=gostls13.git cmd/compile: add logging to critical and phielim Change-Id: Ieefeceea40bd29657fd519368b0920dad8443844 Reviewed-on: https://go-review.googlesource.com/20712 Run-TryBot: Todd Neal TryBot-Result: Gobot Gobot Reviewed-by: Keith Randall --- diff --git a/src/cmd/compile/internal/ssa/critical.go b/src/cmd/compile/internal/ssa/critical.go index 9fea0ec1cd..9230306785 100644 --- a/src/cmd/compile/internal/ssa/critical.go +++ b/src/cmd/compile/internal/ssa/critical.go @@ -22,6 +22,9 @@ func critical(f *Func) { // allocate a new block to place on the edge d := f.NewBlock(BlockPlain) d.Line = c.Line + if f.pass.debug > 0 { + f.Config.Warnl(c.Line, "split critical edge") + } // splice it in d.Preds = append(d.Preds, c) diff --git a/src/cmd/compile/internal/ssa/phielim.go b/src/cmd/compile/internal/ssa/phielim.go index 0461e6e079..ce3b5a199a 100644 --- a/src/cmd/compile/internal/ssa/phielim.go +++ b/src/cmd/compile/internal/ssa/phielim.go @@ -64,5 +64,9 @@ func phielimValue(v *Value) bool { } v.Op = OpCopy v.SetArgs1(w) + f := v.Block.Func + if f.pass.debug > 0 { + f.Config.Warnl(v.Line, "eliminated phi") + } return true }