]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: extend ssa.go to handle 1-element array and 1-field struct
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Tue, 3 Sep 2019 16:24:35 +0000 (23:24 +0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 3 Sep 2019 19:33:04 +0000 (19:33 +0000)
commitd2f958d8d11bcf62fe572885133bfaef41307a14
tree043de28a03afa2f716e8bdfb8e226f8bc9e31c53
parent9da7abd2ebd07d32484277adac75c45b66f504c1
cmd/compile: extend ssa.go to handle 1-element array and 1-field struct

Assinging to 1-element array/1-field struct variable is considered clobbering
the whole variable. By emitting OpVarDef in this case, liveness analysis
can now know the variable is redefined.

Also, the isfat is not necessary anymore, and will be removed in follow up CL.

Fixes #33916

Change-Id: Iece0d90b05273f333d59d6ee5b12ee7dc71908c2
Reviewed-on: https://go-review.googlesource.com/c/go/+/192979
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/ssa.go
test/live.go
test/live2.go