]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: introduce FwdRefAux for wrapping ir.Node as ssa.Aux
authorMatthew Dempsky <mdempsky@google.com>
Mon, 7 Dec 2020 02:10:34 +0000 (18:10 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 8 Dec 2020 01:46:48 +0000 (01:46 +0000)
commit1c8943a6add218f6ffd86c0952372fe54b0672a4
tree2bad10def0d8536654f0c610d6e26a5aeb8514fb
parentdcec658f6c9798b226d2f1e72a7b22b613e95c00
[dev.regabi] cmd/compile: introduce FwdRefAux for wrapping ir.Node as ssa.Aux

OpFwdRef is the only SSA value that needs the ability to store an
arbitrary ir.Node in its Aux field. Every other SSA value always uses
an *ir.Name.

This CL introduces FwdRefAux, which wraps an ir.Node and implements
the ssa.Aux tag interface, so that a subsequent refactoring can change
ir.Node to not implement ssa.Aux.

Passes buildall w/ toolstash -cmp.

Updates #42982.

Change-Id: Id1475b28847579573cd376e82f28761d84cd1c23
Reviewed-on: https://go-review.googlesource.com/c/go/+/275788
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/gc/phi.go
src/cmd/compile/internal/gc/ssa.go