]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: don't emit stack maps for write barrier calls
authorAustin Clements <austin@google.com>
Tue, 28 Apr 2020 00:42:00 +0000 (20:42 -0400)
committerAustin Clements <austin@google.com>
Wed, 29 Apr 2020 21:29:18 +0000 (21:29 +0000)
commit601bc41da2378b342ea3bb2f0e7ab961dfe508a4
tree18e3f346d29397d0d84bcc13edaf9a134569f31c
parentfaafdf5115c994ff6d5ab3fe2eaf70ee47186f54
cmd/compile: don't emit stack maps for write barrier calls

These are necessarily deeply non-preemptible, so there's no point in
emitting stack maps for them. We already mark them as unsafe points,
so this only affects the runtime, since user code does not emit stack
maps at unsafe points. SSAGenState.PrepareCall also excludes them when
it's sanity checking call stack maps.

Right now this only drops a handful of unnecessary stack maps from the
runtime, but we're about to start emitting stack maps only at calls
for user code, too. At that point, this will matter much more.

For #36365.

Change-Id: Ib3abfedfddc8e724d933a064fa4d573500627990
Reviewed-on: https://go-review.googlesource.com/c/go/+/230542
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/plive.go
src/cmd/compile/internal/gc/ssa.go