]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: separate out unsafe mark for end-of-block instructions
authorKeith Randall <khr@golang.org>
Fri, 11 Aug 2023 04:09:33 +0000 (21:09 -0700)
committerKeith Randall <khr@google.com>
Fri, 11 Aug 2023 20:25:13 +0000 (20:25 +0000)
commit727ebce6ce4fab9aeb089f89d5c4b32bb69be403
treebdb47f71c5a2118baeecd2ba7db45187fb7673e5
parent1f4bb6112bdab6c0320b1ecd28a7da79cf8b74e0
cmd/compile: separate out unsafe mark for end-of-block instructions

Even if a block is empty, we need to keep track of whether the
end-of-block instructions are preemptible.

This CL allows us to not mark the load+compare in instruction
sequences like

CMPL $0, runtime·writeBarrier(SB)
JEQ  ...

Before, we had to mark the CMPL as uninterruptible because there
was no way to mark just the JEQ. Now there is, so there is no need
to mark the CMPL itself.

Change-Id: I4c27c0dc211c03b14637d420899cd2c2cccf3493
Reviewed-on: https://go-review.googlesource.com/c/go/+/518539
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
src/cmd/compile/internal/liveness/plive.go
src/cmd/compile/internal/objw/prog.go
src/cmd/compile/internal/ssagen/ssa.go