-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile: skip ptr writeback for appends which don't grow #14969
Comments
Looks like this is related to the following in SSA (ssa.go:OAS case):
So we need to be less aggressive in adding back the write barrier. The frontend basically punts to the backend to decide if write barriers are needed (walk.go, OAS case):
For
This code is similar to what we generate for the generic OAPPEND case, maybe we can share some code. See #15023 for another case of this same problem. |
I'll take a look at this. |
CL https://golang.org/cl/21813 mentions this issue. |
CL https://golang.org/cl/21891 mentions this issue. |
Fixes #15246 Re-opens #14969 Change-Id: Ic0b41c5aa42bbb229a0d62b7f3e5888c6b29293d Reviewed-on: https://go-review.googlesource.com/21891 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
CL https://golang.org/cl/22197 mentions this issue. |
We only need to write the pointer (and the capacity) back when we take the growslice path. For the standard path, only the length needs to be written back.
See #14921 and #14855 .
The text was updated successfully, but these errors were encountered: