1
0
mirror of https://github.com/golang/go synced 2024-11-17 17:54:48 -07:00

cmd/compile/internal/inline: remove useless code

There doesn't appear to be any need for this code. EditChildren won't
recurse into the closure body anyway.

Split out into a separate commit in case I'm overlooking something.

Change-Id: I004d1aa04865896de972bf3323b1622cc08a0d18
Reviewed-on: https://go-review.googlesource.com/c/go/+/543659
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Matthew Dempsky 2023-11-19 22:01:07 -08:00 committed by Gopher Robot
parent 28a8896d57
commit 95712fe70b

View File

@ -848,11 +848,6 @@ func inlnode(callerfn *ir.Func, n ir.Node, bigCaller bool, inlCalls *[]*ir.Inlin
case ir.OTAILCALL:
n := n.(*ir.TailCallStmt)
n.Call.NoInline = true // Not inline a tail call for now. Maybe we could inline it just like RETURN fn(arg)?
// TODO do them here (or earlier),
// so escape analysis can avoid more heapmoves.
case ir.OCLOSURE:
return n
case ir.OCALLFUNC:
n := n.(*ir.CallExpr)
if n.Fun.Op() == ir.OMETHEXPR {