From 472f519fe26652af2fcef6121e259d7f193b27cf Mon Sep 17 00:00:00 2001 From: Than McIntosh Date: Mon, 3 May 2021 09:32:22 -0400 Subject: [PATCH] cmd/compile/internal/ssagen: fix misleading comment Fix up a slightly stale comment in the part of ssa generation that zeros ambiguously live variables: with the advent of the register ABI, the ir.Func "Dcl" slice is no longer entirely sorted by frame offset, although this is still the case for the local vars in Dcl. Change-Id: I633f43d16f0d4e0b444193a6edb6b2aa1154eea7 Reviewed-on: https://go-review.googlesource.com/c/go/+/316309 Trust: Than McIntosh Run-TryBot: Than McIntosh TryBot-Result: Go Bot Reviewed-by: Cherry Zhang --- src/cmd/compile/internal/ssagen/ssa.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd/compile/internal/ssagen/ssa.go b/src/cmd/compile/internal/ssagen/ssa.go index b8f84f5712f..85ebf62e980 100644 --- a/src/cmd/compile/internal/ssagen/ssa.go +++ b/src/cmd/compile/internal/ssagen/ssa.go @@ -7148,7 +7148,8 @@ func defframe(s *State, e *ssafn, f *ssa.Func) { // keep track of which helper registers have been zeroed. var state uint32 - // Iterate through declarations. They are sorted in decreasing Xoffset order. + // Iterate through declarations. Autos are sorted in decreasing + // frame offset order. for _, n := range e.curfn.Dcl { if !n.Needzero() { continue