mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
86dc86b4f9
commit
27bc723b51
2 changed files with 36 additions and 0 deletions
|
|
@ -2176,6 +2176,7 @@ func (s *regAllocState) computeLive() {
|
|||
// out to all of them.
|
||||
po := f.postorder()
|
||||
s.loopnest = f.loopnest()
|
||||
s.loopnest.calculateDepths()
|
||||
for {
|
||||
changed := false
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue