diff options
author | Heschi Kreinick <heschi@google.com> | 2018-01-29 17:01:41 -0500 |
---|---|---|
committer | Heschi Kreinick <heschi@google.com> | 2018-02-14 18:29:23 +0000 |
commit | b8644e324355137bc7b2abe290235e0197df9b13 (patch) | |
tree | fb2e9b8417870c44e02cb6a80b1bb61f7e08d6d6 /src/cmd/compile/internal/ssa/cache.go | |
parent | 7ac756f74b1a7dfc984152d863b3e3c86f90b2c7 (diff) | |
download | go-b8644e324355137bc7b2abe290235e0197df9b13.tar.gz go-b8644e324355137bc7b2abe290235e0197df9b13.zip |
cmd/compile/internal: reuse memory for valueToProgAfter
Not a big improvement, but does help edge cases like the SSA package.
Change-Id: I40e531110b97efd5f45955be477fd0f4faa8d545
Reviewed-on: https://go-review.googlesource.com/92396
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/cache.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/cache.go | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/cmd/compile/internal/ssa/cache.go b/src/cmd/compile/internal/ssa/cache.go index caaac0b387..299c804dd9 100644 --- a/src/cmd/compile/internal/ssa/cache.go +++ b/src/cmd/compile/internal/ssa/cache.go @@ -4,7 +4,10 @@ package ssa -import "sort" +import ( + "cmd/internal/obj" + "sort" +) // A Cache holds reusable compiler state. // It is intended to be re-used for multiple Func compilations. @@ -21,12 +24,13 @@ type Cache struct { domblockstore []ID // scratch space for computing dominators scrSparse []*sparseSet // scratch sparse sets to be re-used. - blockDebug []BlockDebug - valueNames [][]SlotID - slotLocs []VarLoc - regContents [][]SlotID - pendingEntries []pendingEntry - pendingSlotLocs []VarLoc + ValueToProgAfter []*obj.Prog + blockDebug []BlockDebug + valueNames [][]SlotID + slotLocs []VarLoc + regContents [][]SlotID + pendingEntries []pendingEntry + pendingSlotLocs []VarLoc liveSlotSliceBegin int liveSlots []liveSlot |