mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: remove needwritebarrier from the frontend
The write barrier insertion has moved to the SSA backend's
writebarrier pass. There is still needwritebarrier function
left in the frontend. This function is used in two places:
- fncall, which is called in ascompatet, which is called in
walking OAS2FUNC. For OAS2FUNC, in order pass we've already
created temporaries, and there is no write barrier for the
assignments of these temporaries.
- updateHasCall, which updates the HasCall flag of a node. the
HasCall flag is then used in
- fncall, mentioned above.
- ascompatet. As mentioned above, this is an assignment to
a temporary, no write barrier.
- reorder1, which is always called with a list produced by
ascompatte, which is a list of assignments to stack, which
have no write barrier.
- vmatch1, which is called in oaslit with r.Op as OSTRUCTLIT,
OARRAYLIT, OSLICELIT, or OMAPLIT. There is no write barrier
in those literals.
Therefore, the needwritebarrier function is unnecessary. This
CL removes it.
Passes "toolstash -cmp" on std cmd.
Updates #17583.
Change-Id: I4b87ba8363d6583e4282a9e607a9ec8ce3ab124a
Reviewed-on: https://go-review.googlesource.com/43640
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
290de1f880
commit
e0111bb0f4
2 changed files with 0 additions and 54 deletions
|
|
@ -1144,11 +1144,6 @@ func updateHasCall(n *Node) {
|
|||
Fatalf("OLITERAL/ONAME/OTYPE should never have calls: %+v", n)
|
||||
}
|
||||
return
|
||||
case OAS:
|
||||
if needwritebarrier(n.Left) {
|
||||
b = true
|
||||
goto out
|
||||
}
|
||||
case OCALL, OCALLFUNC, OCALLMETH, OCALLINTER:
|
||||
b = true
|
||||
goto out
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue