]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: make translation to calls for SSA look more "value-oriented"
authorDavid Chase <drchase@google.com>
Fri, 26 Jun 2020 22:19:01 +0000 (18:19 -0400)
committerDavid Chase <drchase@google.com>
Wed, 16 Sep 2020 21:02:46 +0000 (21:02 +0000)
commit396688af7ee121d478e9b8d2cc9d06999ba7fc6e
tree25e93987b46f1d18fd8a2c1e374cacbb0b6d7419
parent39da81da5e35e50da74ebb8c4fe12fd363bf41b9
cmd/compile: make translation to calls for SSA look more "value-oriented"

The existing translation assumes an in-memory return values, thus it returns
the address of the result(s).  Most consumers immediately load from the
address to get the value, and in late call expansion that is the favored idiom,
and it is also the favored idiom when arguments and results use registers
instead of memory.

Change-Id: Ie0ccc70f399682a42509d847b330ef3956462d56
Reviewed-on: https://go-review.googlesource.com/c/go/+/240186
Trust: David Chase <drchase@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/ssa.go