]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: do regalloc check only when checkEnabled
authorKeith Randall <khr@golang.org>
Fri, 7 Oct 2016 16:35:04 +0000 (09:35 -0700)
committerKeith Randall <khr@golang.org>
Fri, 7 Oct 2016 17:33:15 +0000 (17:33 +0000)
No point doing this check all the time.

Fixes #15621

Change-Id: I1966c061986fe98fe9ebe146d6b9738c13cef724
Reviewed-on: https://go-review.googlesource.com/30670
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/compile/internal/ssa/regalloc.go

index 4cf957a41a3660d0f5b55acdb1d60822a5373d87..8309af2997528ffc80b34ff1ddf2e1a81b9e5c19 100644 (file)
@@ -1436,8 +1436,7 @@ func (s *regAllocState) regalloc(f *Func) {
                }
                s.endRegs[b.ID] = regList
 
-               // Check. TODO: remove
-               {
+               if checkEnabled {
                        liveSet.clear()
                        for _, x := range s.live[b.ID] {
                                liveSet.add(x.ID)