]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssagen: sort locals by alignment, not size
authorMatthew Dempsky <mdempsky@google.com>
Fri, 4 Aug 2023 19:53:11 +0000 (12:53 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 7 Aug 2023 00:28:01 +0000 (00:28 +0000)
commit41981930354fdc7bbb59950ce8f303939396b211
tree278c45c9ab208cf5ecd4634a3dae196c8acb0d73
parentcd162d27dcc5fb8e75ccec2b1015849399a626e9
cmd/compile/internal/ssagen: sort locals by alignment, not size

Sorting variables by size doesn't actually do anything, but sorting by
alignment makes sure we can optimally pack variables into the stack
frame.

While here, replace the monolithic description at the top of
cmpstackvarlt with line-by-line explanations of what each comparison
is doing.

Change-Id: I860677799618130ce4a55f084cec637cb9a2e295
Reviewed-on: https://go-review.googlesource.com/c/go/+/516197
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/cmd/compile/internal/ssagen/pgen.go