]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: aggregate scalar allocations for heap escapes
authorKeith Randall <khr@golang.org>
Wed, 12 Feb 2025 02:58:13 +0000 (18:58 -0800)
committerKeith Randall <khr@golang.org>
Fri, 4 Apr 2025 17:53:05 +0000 (10:53 -0700)
commit5fc596ebe7c34b9f68c33da5ffc4f3645c38ef72
tree11e46010c5f48d0e2361f7f3f2bb79ec3659efdb
parent6839e71d82e0f2c93e043820db6c0238a65ae0fa
cmd/compile: aggregate scalar allocations for heap escapes

If multiple small scalars escape to the heap, allocate them together
with a single allocation. They are going to be aggregated together
in the tiny allocator anyway, might as well do just one runtime call.

Change-Id: I4317e29235af63de378a26436a18d7fb0c39e41f
Reviewed-on: https://go-review.googlesource.com/c/go/+/648536
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/ir/symtab.go
src/cmd/compile/internal/ssa/value.go
src/cmd/compile/internal/ssagen/ssa.go
src/cmd/compile/internal/test/locals_test.go [new file with mode: 0644]