[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:
Keith Randall 2016-01-28 13:46:30 -08:00
parent 6a96a2fe5a
commit 2f57d0fe02
8 changed files with 168 additions and 176 deletions

View file

@ -496,6 +496,7 @@ func compile(fn *Node) {
if Curfn.Func.Endlineno != 0 {
lineno = Curfn.Func.Endlineno
}
ssafn.Free()
return
}
Genlist(Curfn.Func.Enter)