]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: initialize loop depths
authorKeith Randall <khr@golang.org>
Wed, 22 Mar 2017 00:12:33 +0000 (17:12 -0700)
committerKeith Randall <khr@golang.org>
Thu, 23 Mar 2017 16:41:22 +0000 (16:41 +0000)
commit27bc723b5130d11e4d3bae9566a3043a2dff2b8a
treeb35243e923996f68e49c0661efc6bb55685b7ac6
parent86dc86b4f948e16001903879162e9cf8da8f0537
cmd/compile: initialize loop depths

Regalloc uses loop depths - make sure they are initialized!

Test to make sure we aren't pushing spills into loops.

This fixes a generated-code performance bug introduced with
the better spill placement change:
https://go-review.googlesource.com/c/34822/

Update #19595

Change-Id: Ib9f0da6fb588503518847d7aab51e569fd3fa61e
Reviewed-on: https://go-review.googlesource.com/38434
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/regalloc.go
src/cmd/compile/internal/ssa/regalloc_test.go