diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2021-01-03 00:53:51 -0800 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2021-01-03 19:48:20 +0000 |
| commit | 8fc44cf0fac5357f45cacc445c0900a8fd054bd5 (patch) | |
| tree | 8ee266e5d511430ec69a658680eddebe46587327 /src/cmd/compile/internal/inline | |
| parent | 907a4bfdc75004bc31c30564734cffc61ab1e80c (diff) | |
| download | go-8fc44cf0fac5357f45cacc445c0900a8fd054bd5.tar.xz | |
[dev.regabi] cmd/compile: remove a couple CloneName calls
In inl.go, that code path is unused, since we added ir.BasicLit to
represent unnamed OLITERALs.
In race.go, rather than cloning ir.RegFP, we can just create it from
scratch again.
Passes toolstash -cmp (incl. w/ -race).
Change-Id: I8e063e4898d2acf056ceca5bc03df6b40a14eca9
Reviewed-on: https://go-review.googlesource.com/c/go/+/281192
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/inline')
| -rw-r--r-- | src/cmd/compile/internal/inline/inl.go | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/cmd/compile/internal/inline/inl.go b/src/cmd/compile/internal/inline/inl.go index 2887abb061..b9b424b74d 100644 --- a/src/cmd/compile/internal/inline/inl.go +++ b/src/cmd/compile/internal/inline/inl.go @@ -1096,15 +1096,6 @@ func (subst *inlsubst) node(n ir.Node) ir.Node { if n.Sym() != nil { return n } - if n, ok := n.(*ir.Name); ok && n.Op() == ir.OLITERAL { - // This happens for unnamed OLITERAL. - // which should really not be a *Name, but for now it is. - // ir.Copy(n) is not allowed generally and would panic below, - // but it's OK in this situation. - n = n.CloneName() - n.SetPos(subst.updatedPos(n.Pos())) - return n - } case ir.ORETURN: // Since we don't handle bodies with closures, |
