]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: do not allocate space for unspilled in-register results
authorCherry Zhang <cherryyz@google.com>
Fri, 9 Apr 2021 22:02:48 +0000 (18:02 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 12 Apr 2021 17:56:06 +0000 (17:56 +0000)
commit865d2bc78e5b6170c8b773880dc5fa3405791dc2
tree4209b098c541b62d8300adcdc24dc128871c96f7
parent8b859be9c3fd1068b659afa1db76dadb210c63de
cmd/compile: do not allocate space for unspilled in-register results

For function results, if in register, we allocate spill slots
within the frame like locals. Currently, even if we never spill
to it the slot is still allocated. This CL makes it not allocate
the slot if it is never used.

Change-Id: Idbd4e3096cfac6d2bdfb501d8efde48ee2191d7b
Reviewed-on: https://go-review.googlesource.com/c/go/+/309150
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/compile/internal/ssagen/pgen.go