]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/inline: remove useless code
authorMatthew Dempsky <mdempsky@google.com>
Mon, 20 Nov 2023 06:01:07 +0000 (22:01 -0800)
committerGopher Robot <gobot@golang.org>
Mon, 20 Nov 2023 15:13:42 +0000 (15:13 +0000)
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>

src/cmd/compile/internal/inline/inl.go

index d808c438ca233e8cc4cae5d41af6c2563ab26d09..7aed532c99dac9e08857973ffe446c2fa54e3413 100644 (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 {