diff options
author | David Chase <drchase@google.com> | 2020-07-15 09:07:00 -0400 |
---|---|---|
committer | David Chase <drchase@google.com> | 2020-09-18 16:15:57 +0000 |
commit | 65dfe4a772a4bc612219d93886e5c07290785ee6 (patch) | |
tree | 6fed706b26a778ac91a94b26bcc74055d8c31bb7 /src/cmd/compile/internal/types/type.go | |
parent | 44c0586931344c2c218b8074972b18fd5ff440bc (diff) | |
download | go-65dfe4a772a4bc612219d93886e5c07290785ee6.tar.gz go-65dfe4a772a4bc612219d93886e5c07290785ee6.zip |
cmd/compile: generate late-lowering static calls
This is testing for the limited case of zero or one SSA-able results.
One regression is that the later expansion of "Dereference" into
Move into argument slots thwarts the
MOVE A -> B, MOVE B -> C
replaced-by
MOVE A -> B, MOVE A -> C
optimization; the second move is written instead as a Dereference at the
phase where the optimization occurs, and because the target of the
dereference is not visible in the dereference, it's not possible to verify
that A and B or A and C don't overlap in some peculiar way (and for results
fed to args, they can).
Regression is repaired in a later CL by changing when calls are expanded.
Change-Id: Ia0f48a9d483d5a54a99657a24b12b25b8edde55f
Reviewed-on: https://go-review.googlesource.com/c/go/+/242782
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>
Diffstat (limited to 'src/cmd/compile/internal/types/type.go')
-rw-r--r-- | src/cmd/compile/internal/types/type.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/types/type.go b/src/cmd/compile/internal/types/type.go index 9b05aef429..5d1d5d4008 100644 --- a/src/cmd/compile/internal/types/type.go +++ b/src/cmd/compile/internal/types/type.go @@ -68,7 +68,7 @@ const ( // SSA backend types TSSA // internal types used by SSA backend (flags, memory, etc.) TTUPLE // a pair of types, used by SSA backend - TRESULTS // multiuple types; the resulting of calling a function or method, plus a memory at the end. + TRESULTS // multiple types; the result of calling a function or method, with a memory at the end. NTYPE ) @@ -331,9 +331,9 @@ type Tuple struct { // Any tuple with a memory type must put that memory type second. } +// Results are the output from calls that will be late-expanded. type Results struct { - Types []*Type - // Any Results with a memory type must put that memory type last. + Types []*Type // Last element is memory output from call. } // Array contains Type fields specific to array types. |