From: Matthew Dempsky Date: Mon, 25 Jan 2021 01:36:59 +0000 (-0800) Subject: [dev.typeparams] all: merge dev.regabi (063c72f) into dev.typeparams X-Git-Tag: go1.17beta1~1473^2~71^2 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6d8d11876287c86424fd6b33cf5e459e8bfa06fa;p=gostls13.git [dev.typeparams] all: merge dev.regabi (063c72f) into dev.typeparams Eager re-sync-branch to keep Git history reasonably accurate, since Git lacks a better way of encoding partial merges like CL 286172. Conflicts: - src/cmd/compile/internal/inline/inl.go - src/cmd/compile/internal/noder/import.go - src/cmd/compile/internal/noder/noder.go Merge List: + 2021-01-25 063c72f06d [dev.regabi] cmd/compile: backport changes from dev.typeparams (9456804) + 2021-01-23 d05d6fab32 [dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet for SSA 2 + 2021-01-23 48badc5fa8 [dev.regabi] cmd/compile: fix escape analysis problem with closures + 2021-01-23 51e1819a8d [dev.regabi] cmd/compile: scan body of closure in tooHairy to check for disallowed nodes Change-Id: I48c0435f7aaf56f4aec26518a7459e9d95a51e9c --- 6d8d11876287c86424fd6b33cf5e459e8bfa06fa diff --cc src/cmd/compile/internal/inline/inl.go index f0be169f56,9f9bb87dd5..bbbdaa63d4 --- a/src/cmd/compile/internal/inline/inl.go +++ b/src/cmd/compile/internal/inline/inl.go @@@ -354,17 -354,16 +354,23 @@@ func (v *hairyVisitor) doNode(n ir.Node return true case ir.OCLOSURE: + // TODO(danscales,mdempsky): Get working with -G. + // Probably after #43818 is fixed. + if base.Flag.G > 0 { + v.reason = "inlining closures not yet working with -G" + return true + } + - // TODO(danscales) - fix some bugs when budget is lowered below 30 + // TODO(danscales) - fix some bugs when budget is lowered below 15 // Maybe make budget proportional to number of closure variables, e.g.: //v.budget -= int32(len(n.(*ir.ClosureExpr).Func.ClosureVars) * 3) - v.budget -= 30 + v.budget -= 15 + // Scan body of closure (which DoChildren doesn't automatically + // do) to check for disallowed ops in the body and include the + // body in the budget. + if doList(n.(*ir.ClosureExpr).Func.Body, v.do) { + return true + } case ir.ORANGE, ir.OSELECT,