From 93d5f43a29dea00a5dffd1fa8faed911a31b55fb Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Fri, 7 Oct 2016 09:35:04 -0700 Subject: [PATCH] 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/30670 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/cmd/compile/internal/ssa/regalloc.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cmd/compile/internal/ssa/regalloc.go b/src/cmd/compile/internal/ssa/regalloc.go index 4cf957a41a..8309af2997 100644 --- a/src/cmd/compile/internal/ssa/regalloc.go +++ b/src/cmd/compile/internal/ssa/regalloc.go @@ -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)