Commit 93d5f43a authored by Keith Randall's avatar Keith Randall

cmd/compile: do regalloc check only when checkEnabled

No point doing this check all the time.

Fixes #15621

Change-Id: I1966c061986fe98fe9ebe146d6b9738c13cef724
Reviewed-on: https://go-review.googlesource.com/30670Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 0db9518a
...@@ -1436,8 +1436,7 @@ func (s *regAllocState) regalloc(f *Func) { ...@@ -1436,8 +1436,7 @@ func (s *regAllocState) regalloc(f *Func) {
} }
s.endRegs[b.ID] = regList s.endRegs[b.ID] = regList
// Check. TODO: remove if checkEnabled {
{
liveSet.clear() liveSet.clear()
for _, x := range s.live[b.ID] { for _, x := range s.live[b.ID] {
liveSet.add(x.ID) liveSet.add(x.ID)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment