[dev.regabi] cmd/compile: clean up ONEW node

The list is no longer needed and can be deleted.
Doing so reduces the inlining cost of any function containing
an explicit call to new by 1 point, so this change is not
toolstash -cmp safe.

Change-Id: Id29e115d68e466a353708ab4b8c1021e9c85a628
Reviewed-on: https://go-review.googlesource.com/c/go/+/274132
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Russ Cox 2020-11-30 14:16:39 -05:00
parent b7f67b75d2
commit 2bc814cd18

View file

@ -1315,11 +1315,6 @@ func typecheck1(n ir.Node, top int) (res ir.Node) {
old := n
n = ir.NodAt(n.Pos(), l.SubOp(), arg, nil)
n = addinit(n, old.Init().Slice()) // typecheckargs can add to old.Init
if l.SubOp() == ir.ONEW {
// Bug-compatibility with earlier version.
// This extra node is unnecessary but raises the inlining cost by 1.
n.SetList(old.List())
}
case ir.OCOMPLEX, ir.OCOPY:
typecheckargs(n)