diff options
author | Matthew Dempsky <mdempsky@google.com> | 2021-01-03 20:14:00 -0800 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2021-01-04 10:30:09 +0000 |
commit | f24e40c14a0a767b6663c85dc900bb9e6b7c2d8e (patch) | |
tree | 0a0a73c3df818b6d574bb4d55c3e96689f5ca4e9 /src/cmd/compile/internal/ssa | |
parent | d89705e08742c0f4fdf5d2bdbab6f344c6be884f (diff) | |
download | go-f24e40c14a0a767b6663c85dc900bb9e6b7c2d8e.tar.gz go-f24e40c14a0a767b6663c85dc900bb9e6b7c2d8e.zip |
[dev.regabi] cmd/compile: remove Name.Class_ accessors
These aren't part of the Node interface anymore, so no need to keep
them around.
Passes toolstash -cmp.
[git-generate]
cd src/cmd/compile/internal/ir
: Fix one off case that causes trouble for rf.
sed -i -e 's/n.SetClass(ir.PAUTO)/n.Class_ = ir.PAUTO/' ../ssa/export_test.go
pkgs=$(go list . ../...)
rf '
ex '"$(echo $pkgs)"' {
var n *Name
var c Class
n.Class() -> n.Class_
n.SetClass(c) -> n.Class_ = c
}
rm Name.Class
rm Name.SetClass
mv Name.Class_ Name.Class
'
Change-Id: Ifb304bf4691a8c455456aabd8aa77178d4a49500
Reviewed-on: https://go-review.googlesource.com/c/go/+/281294
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa')
-rw-r--r-- | src/cmd/compile/internal/ssa/deadstore.go | 8 | ||||
-rw-r--r-- | src/cmd/compile/internal/ssa/export_test.go | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/ssa/deadstore.go b/src/cmd/compile/internal/ssa/deadstore.go index a68c82ba97..530918da4d 100644 --- a/src/cmd/compile/internal/ssa/deadstore.go +++ b/src/cmd/compile/internal/ssa/deadstore.go @@ -148,7 +148,7 @@ func elimDeadAutosGeneric(f *Func) { case OpAddr, OpLocalAddr: // Propagate the address if it points to an auto. n, ok := v.Aux.(*ir.Name) - if !ok || n.Class() != ir.PAUTO { + if !ok || n.Class != ir.PAUTO { return } if addr[v] == nil { @@ -159,7 +159,7 @@ func elimDeadAutosGeneric(f *Func) { case OpVarDef, OpVarKill: // v should be eliminated if we eliminate the auto. n, ok := v.Aux.(*ir.Name) - if !ok || n.Class() != ir.PAUTO { + if !ok || n.Class != ir.PAUTO { return } if elim[v] == nil { @@ -175,7 +175,7 @@ func elimDeadAutosGeneric(f *Func) { // may not be used by the inline code, but will be used by // panic processing). n, ok := v.Aux.(*ir.Name) - if !ok || n.Class() != ir.PAUTO { + if !ok || n.Class != ir.PAUTO { return } if !used[n] { @@ -307,7 +307,7 @@ func elimUnreadAutos(f *Func) { if !ok { continue } - if n.Class() != ir.PAUTO { + if n.Class != ir.PAUTO { continue } diff --git a/src/cmd/compile/internal/ssa/export_test.go b/src/cmd/compile/internal/ssa/export_test.go index 8712ff78c1..32e6d09d1b 100644 --- a/src/cmd/compile/internal/ssa/export_test.go +++ b/src/cmd/compile/internal/ssa/export_test.go @@ -70,7 +70,7 @@ func (TestFrontend) StringData(s string) *obj.LSym { } func (TestFrontend) Auto(pos src.XPos, t *types.Type) *ir.Name { n := ir.NewNameAt(pos, &types.Sym{Name: "aFakeAuto"}) - n.SetClass(ir.PAUTO) + n.Class = ir.PAUTO return n } func (d TestFrontend) SplitString(s LocalSlot) (LocalSlot, LocalSlot) { |