[dev.ssa] cmd/compile: memory allocation tweaks to regalloc and dom

Spotted a minor source of excess allocation in the register
allocator.  Rearranged the dominator tree code to pull its
scratch memory from a reused buffer attached to Config.

Change-Id: I6da6e7b112f7d3eb1fd00c58faa8214cdea44e38
Reviewed-on: https://go-review.googlesource.com/19450
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
David Chase 2016-02-10 17:43:31 -05:00
parent 94f0245114
commit b86cafc7dc
3 changed files with 74 additions and 20 deletions

View file

@ -24,7 +24,8 @@ type Config struct {
values [2000]Value
blocks [200]Block
scrSparse []*sparseSet // scratch sparse sets to be re-used.
domblockstore []ID // scratch space for computing dominators
scrSparse []*sparseSet // scratch sparse sets to be re-used.
}
type TypeSource interface {