diff options
author | Heschi Kreinick <heschi@google.com> | 2018-02-05 17:04:44 -0500 |
---|---|---|
committer | Heschi Kreinick <heschi@google.com> | 2018-02-21 18:10:00 +0000 |
commit | 438a757d73958ca9b9874df32d13e001180906af (patch) | |
tree | e47d2d2ca8162266f730871d572e56f53eed0c9a /src/cmd/compile/internal/ssa/cache.go | |
parent | ac81c5c402ac1023296d4c418287d26aa48061d7 (diff) | |
download | go-438a757d73958ca9b9874df32d13e001180906af.tar.gz go-438a757d73958ca9b9874df32d13e001180906af.zip |
cmd/compile/internal: reuse more memory
Reuse even more memory, and keep track of it in a long-lived debugState
object rather than piecemeal in the Cache.
Change-Id: Ib6936b4e8594dc6dda1f59ece753c00fd1c136ba
Reviewed-on: https://go-review.googlesource.com/92404
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 | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/cmd/compile/internal/ssa/cache.go b/src/cmd/compile/internal/ssa/cache.go index 299c804dd9..46edcc25d9 100644 --- a/src/cmd/compile/internal/ssa/cache.go +++ b/src/cmd/compile/internal/ssa/cache.go @@ -25,15 +25,7 @@ type Cache struct { scrSparse []*sparseSet // scratch sparse sets to be re-used. ValueToProgAfter []*obj.Prog - blockDebug []BlockDebug - valueNames [][]SlotID - slotLocs []VarLoc - regContents [][]SlotID - pendingEntries []pendingEntry - pendingSlotLocs []VarLoc - - liveSlotSliceBegin int - liveSlots []liveSlot + debugState debugState } func (c *Cache) Reset() { @@ -53,16 +45,5 @@ func (c *Cache) Reset() { xl[i] = nil } - c.liveSlots = c.liveSlots[:0] - c.liveSlotSliceBegin = 0 -} - -func (c *Cache) AppendLiveSlot(ls liveSlot) { - c.liveSlots = append(c.liveSlots, ls) } -func (c *Cache) GetLiveSlotSlice() []liveSlot { - s := c.liveSlots[c.liveSlotSliceBegin:] - c.liveSlotSliceBegin = len(c.liveSlots) - return s -} |