aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/stackalloc.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2022-10-28 14:14:24 -0700
committerKeith Randall <khr@google.com>2022-10-31 21:40:49 +0000
commit9ce27feaeb91b2f30ff8cbe3be1ece3071f3f6b2 (patch)
tree3f11bf7ef196576d855093605a7e03f6dfbb93af /src/cmd/compile/internal/ssa/stackalloc.go
parent204be97d24e4d6bbe2d5b8e85feb456e88fe0f6d (diff)
downloadgo-9ce27feaeb91b2f30ff8cbe3be1ece3071f3f6b2.tar.xz
cmd/compile: add rule for post-decomposed growslice optimization
The recently added rule only works before decomposing slices. Add a rule that works after decomposing slices. The reason we need the latter is because although the length may be a constant, it can be hidden inside a slice that is not constant (its pointer or capacity might be changing). By applying this optimization after decomposing slices, we can find more cases where it applies. Fixes #56440 Change-Id: I0094e59eee3065ab4d210defdda8227a6e897420 Reviewed-on: https://go-review.googlesource.com/c/go/+/446277 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/stackalloc.go')
0 files changed, 0 insertions, 0 deletions