[go] cmd/compile: make escape diagnostic paths immutable

0 views
Skip to first unread message

Jake Bailey (Gerrit)

unread,
Aug 15, 2026, 12:00:43 AM (yesterday) Aug 15
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Dmitri Shuralyov, Keith Randall, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, t hepudds, Mateusz Poliwczak, golang-co...@googlegroups.com

Jake Bailey submitted the change

Change information

Commit message:
cmd/compile: make escape diagnostic paths immutable

Replace the mutable predecessor fields used by detailed escape
diagnostics with immutable, walk-local path snapshots.

This is in prep for a follow-up CL that groups equivalent roots into
multi-source walks, where shared predecessor state can switch between
roots as shorter paths are found.

Snapshots are only allocated for -m=2 and logopt. Six interleaved -m=2
compilations of cmd/compile/internal/ssa showed no meaningful
performance difference (wall -0.5%, user +0.9%, RSS -1.3%). Plain -m is
unaffected.

Escape analysis results are unchanged.
Change-Id: I8067b3aa4e87f57cf6d0927ad533ae380f970c88
Reviewed-by: Keith Randall <k...@golang.org>
Reviewed-by: Keith Randall <k...@google.com>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Files:
  • M src/cmd/compile/internal/escape/graph.go
  • M src/cmd/compile/internal/escape/solve.go
Change size: M
Delta: 2 files changed, 32 insertions(+), 21 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: I8067b3aa4e87f57cf6d0927ad533ae380f970c88
Gerrit-Change-Number: 803461
Gerrit-PatchSet: 5
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-Reviewer: Mateusz Poliwczak <mpoliw...@gmail.com>
Gerrit-Reviewer: t hepudds <thepud...@gmail.com>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages