mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.ssa] cmd/compile: preallocate small-numbered values and blocks
Speeds up the compiler ~5%. Change-Id: Ia5cf0bcd58701fd14018ec77d01f03d5c7d6385b Reviewed-on: https://go-review.googlesource.com/19060 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
6a96a2fe5a
commit
2f57d0fe02
8 changed files with 168 additions and 176 deletions
|
|
@ -964,9 +964,7 @@ func (s *regAllocState) regalloc(f *Func) {
|
|||
// Constants, SP, SB, ...
|
||||
continue
|
||||
}
|
||||
spill.Op = OpInvalid
|
||||
spill.Type = TypeInvalid
|
||||
spill.resetArgs()
|
||||
f.freeValue(spill)
|
||||
}
|
||||
for _, b := range f.Blocks {
|
||||
i := 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue