[go] cmd/compile: represent escape analysis callees as a slice

0 views
Skip to first unread message

Keith Randall (Gerrit)

unread,
May 15, 2026, 12:50:41 PM (16 hours ago) May 15
to Keith Randall, Jake Bailey, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Dmitri Shuralyov, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

Keith Randall submitted the change

Change information

Commit message:
cmd/compile: represent escape analysis callees as a slice

Change the callee variable in escape analysis from a single fn *ir.Name
to a slice fns []*ir.Name, in prep for a follow-up CL that starts
resolving multiple callees.

I replaced the mutable argumentParam func with some plain loops; it was
getting unweildy to manage this state and the final result feels a lot
more understandable (when read without a diff viewer anyway).

No behavior change: fns still contains at most one element.
Change-Id: Ie317b852d68413354ad2aefe426f745d033370af
Reviewed-by: Keith Randall <k...@google.com>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Reviewed-by: Keith Randall <k...@golang.org>
Files:
  • M src/cmd/compile/internal/escape/call.go
Change size: M
Delta: 1 file changed, 93 insertions(+), 75 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ie317b852d68413354ad2aefe426f745d033370af
Gerrit-Change-Number: 775640
Gerrit-PatchSet: 3
Gerrit-Owner: Jake Bailey <jacob.b...@gmail.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Jake Bailey <jacob.b...@gmail.com>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-Reviewer: Keith Randall <k...@google.com>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages