]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: find last StoreWB explicitly
authorCherry Zhang <cherryyz@google.com>
Sun, 4 Dec 2016 00:17:16 +0000 (19:17 -0500)
committerCherry Zhang <cherryyz@google.com>
Mon, 5 Dec 2016 03:53:56 +0000 (03:53 +0000)
commited0b232cdc48398c2074369852e5db8bdcb866aa
treed20e6c8576911b4985cfbf5945ed59aee3b865d9
parentaf67f7de3f7b0d26f95d813022f876eef1fa3889
cmd/compile: find last StoreWB explicitly

In writebarrier phase, a chain of StoreWBs is rewritten to branchy
code to invoke write barriers, and the last store in the chain is
spliced into a Phi op to join the memory of the two branches. We
must find the last store explicitly, since the values are not
scheduled and they may not come in dependency order.

Fixes #18169.

Change-Id: If547e3c562ef0669bc5622c1bb711904dc36314d
Reviewed-on: https://go-review.googlesource.com/33915
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/export_test.go
src/cmd/compile/internal/ssa/type_test.go
src/cmd/compile/internal/ssa/writebarrier.go
src/cmd/compile/internal/ssa/writebarrier_test.go [new file with mode: 0644]