]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use better line numbers for write barriers
authorKeith Randall <khr@golang.org>
Mon, 21 Aug 2023 21:10:24 +0000 (14:10 -0700)
committerKeith Randall <khr@golang.org>
Tue, 22 Aug 2023 15:11:33 +0000 (15:11 +0000)
commit463c34451dbb08970768c6184b666157c67191bf
treeeace625abec6de3d61962c087477bc183f2f9e40
parent63ab68ddc5f1307e552cf27ae7a6f0dfda2bb962
cmd/compile: use better line numbers for write barriers

When the write barrier does several pointer writes under one
write barrier flag check, the line numbers aren't really correct.

The writes inside the write barrier have a confusing set of positions.
The loads of the old values are given the line number of the
corresponding store instruction, but the stores into the write buffer
are given the line number of the first store. Instead, give them all
line numbers corresponding to the store instruction.

The writes at the merge point, which are the original writes and the
only ones that happen when the barrier is off, are currently all given
the line number of the first write. Instead give them their original
line number.

Change-Id: Id64820b707f45f07b0978f8d03c97900fdc4bc0b
Reviewed-on: https://go-review.googlesource.com/c/go/+/521499
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/writebarrier.go