]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: fix choice of phi building algorithm
authorAndrew Pogrebnoy <absourd.noise@gmail.com>
Mon, 3 Oct 2016 23:39:33 +0000 (02:39 +0300)
committerKeith Randall <khr@golang.org>
Fri, 7 Oct 2016 19:44:07 +0000 (19:44 +0000)
The algorithm for placing a phi nodes in small functions now
unreachable. This patch fix that.

Change-Id: I253d745b414fa12ee0719459c28e78a69c6861ae
Reviewed-on: https://go-review.googlesource.com/30106
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/phi.go

index ea9e5b10aaf5d24fb4cef2bd45ca98e64b0ed705..0d4dbb5b2ee170289b834e93a504ed37584ec744 100644 (file)
@@ -28,7 +28,7 @@ const debugPhi = false
 // of the appropriate phi or definition.
 // TODO: make this part of cmd/compile/internal/ssa somehow?
 func (s *state) insertPhis() {
-       if len(s.f.Blocks) <= smallBlocks && false {
+       if len(s.f.Blocks) <= smallBlocks {
                sps := simplePhiState{s: s, f: s.f, defvars: s.defvars}
                sps.insertPhis()
                return