From: Matthew Dempsky Date: Mon, 20 Nov 2023 06:01:07 +0000 (-0800) Subject: cmd/compile/internal/inline: remove useless code X-Git-Tag: go1.22rc1~250 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=95712fe70bb8d6f3c00662acdff79db3da067026;p=gostls13.git 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 Reviewed-by: Than McIntosh Auto-Submit: Matthew Dempsky --- diff --git a/src/cmd/compile/internal/inline/inl.go b/src/cmd/compile/internal/inline/inl.go index d808c438ca..7aed532c99 100644 --- a/src/cmd/compile/internal/inline/inl.go +++ b/src/cmd/compile/internal/inline/inl.go @@ -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 {