From 95712fe70bb8d6f3c00662acdff79db3da067026 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Sun, 19 Nov 2023 22:01:07 -0800 Subject: [PATCH] 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 --- src/cmd/compile/internal/inline/inl.go | 5 ----- 1 file changed, 5 deletions(-) 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 {