mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: eliminate OASWB
Instead we can just call needwritebarrier when constructing the SSA representation. Change-Id: I6fefaad49daada9cdb3050f112889e49dca0047b Reviewed-on: https://go-review.googlesource.com/34566 Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
e7ec06e000
commit
bdb9b945b9
11 changed files with 17 additions and 40 deletions
|
|
@ -752,11 +752,6 @@ func fixedlit(ctxt initContext, kind initKind, n *Node, var_ *Node, init *Nodes)
|
|||
switch kind {
|
||||
case initKindStatic:
|
||||
a = walkexpr(a, init) // add any assignments in r to top
|
||||
if a.Op == OASWB {
|
||||
// Static initialization never needs
|
||||
// write barriers.
|
||||
a.Op = OAS
|
||||
}
|
||||
if a.Op != OAS {
|
||||
Fatalf("fixedlit: not as, is %v", a)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue