diff options
author | Matthew Dempsky <mdempsky@google.com> | 2020-12-06 18:13:43 -0800 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2020-12-08 01:46:57 +0000 |
commit | 6db970e20acd7caeed268fdff458609570f21c90 (patch) | |
tree | 08ef0fd6bc8586b86ca96be6b7afd106bbd1e4ab /src/cmd/compile/internal/mips64 | |
parent | 1c8943a6add218f6ffd86c0952372fe54b0672a4 (diff) | |
download | go-6db970e20acd7caeed268fdff458609570f21c90.tar.gz go-6db970e20acd7caeed268fdff458609570f21c90.zip |
[dev.regabi] cmd/compile: rewrite Aux uses of ir.Node to *ir.Name [generated]
Now that the only remaining ir.Node implementation that is stored
(directly) into ssa.Aux, we can rewrite all of the conversions between
ir.Node and ssa.Aux to use *ir.Name instead.
rf doesn't have a way to rewrite the type switch case clauses, so we
just use sed instead. There's only a handful, and they're the only
times that "case ir.Node" appears anyway.
The next CL will move the tag method declarations so that ir.Node no
longer implements ssa.Aux.
Passes buildall w/ toolstash -cmp.
Updates #42982.
[git-generate]
cd src/cmd/compile/internal
sed -i -e 's/case ir.Node/case *ir.Name/' gc/plive.go */ssa.go
cd ssa
rf '
ex . ../gc {
import "cmd/compile/internal/ir"
var v *Value
v.Aux.(ir.Node) -> v.Aux.(*ir.Name)
var n ir.Node
var asAux func(Aux)
strict n # only match ir.Node-typed expressions; not *ir.Name
implicit asAux # match implicit assignments to ssa.Aux
asAux(n) -> n.(*ir.Name)
}
'
Change-Id: I3206ef5f12a7cfa37c5fecc67a1ca02ea4d52b32
Reviewed-on: https://go-review.googlesource.com/c/go/+/275789
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>
Diffstat (limited to 'src/cmd/compile/internal/mips64')
-rw-r--r-- | src/cmd/compile/internal/mips64/ssa.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/mips64/ssa.go b/src/cmd/compile/internal/mips64/ssa.go index bcadebde4e..9aaf8715de 100644 --- a/src/cmd/compile/internal/mips64/ssa.go +++ b/src/cmd/compile/internal/mips64/ssa.go @@ -263,7 +263,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { case *obj.LSym: wantreg = "SB" gc.AddAux(&p.From, v) - case ir.Node: + case *ir.Name: wantreg = "SP" gc.AddAux(&p.From, v) case nil: |