]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: move raw writes out of write barrier code
authorKeith Randall <khr@golang.org>
Tue, 1 Nov 2022 21:18:09 +0000 (14:18 -0700)
committerKeith Randall <khr@golang.org>
Fri, 17 Feb 2023 22:21:22 +0000 (22:21 +0000)
commitd49719b1f75ea745937bdbc09ae5927c5378780b
tree1e68379c42183f99f70986129d2a75c6adcfb6f2
parentd3daeb5267b626db36adf2f39c36f6caf94447e3
cmd/compile: move raw writes out of write barrier code

Previously, the write barrier calls themselves did the actual
writes to memory. Instead, move those writes out to a common location
that both the wb-enabled and wb-disabled code paths share.

This enables us to optimize the write barrier path without having
to worry about performing the actual writes.

Change-Id: Ia71ab651908ec124cc33141afb52e4ca19733ac6
Reviewed-on: https://go-review.googlesource.com/c/go/+/447780
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Bypass: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
16 files changed:
src/cmd/compile/internal/ir/symtab.go
src/cmd/compile/internal/liveness/plive.go
src/cmd/compile/internal/ssa/writebarrier.go
src/cmd/compile/internal/ssagen/ssa.go
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_arm.s
src/runtime/asm_arm64.s
src/runtime/asm_loong64.s
src/runtime/asm_mips64x.s
src/runtime/asm_mipsx.s
src/runtime/asm_ppc64x.s
src/runtime/asm_riscv64.s
src/runtime/asm_s390x.s
src/runtime/asm_wasm.s
src/runtime/mbarrier.go