]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: handle aggregate OpArg in registers
authorDavid Chase <drchase@google.com>
Wed, 17 Feb 2021 15:38:03 +0000 (10:38 -0500)
committerDavid Chase <drchase@google.com>
Wed, 3 Mar 2021 15:00:48 +0000 (15:00 +0000)
commit9f33dc3ca1b7b6bdb1a8e83c24d490f579bbbdc8
tree2b3ff2bdfd9e48e78cdd1570c86c2957a093b5b1
parentc4e3f6c4c78f52060d409a549b83b72644069137
cmd/compile: handle aggregate OpArg in registers

Also handles case where OpArg does not escape but has its address
taken.

May have exposed a lurking bug in 1.16 expandCalls,
if e.g., loading len(someArrayOfstructThing[0].secondStringField)
from a local.  Maybe.

For #40724.

Change-Id: I0298c4ad5d652b5e3d7ed6a62095d59e2d8819c7
Reviewed-on: https://go-review.googlesource.com/c/go/+/293396
Trust: David Chase <drchase@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/amd64/ssa.go
src/cmd/compile/internal/ssa/expand_calls.go
src/cmd/compile/internal/ssa/op.go
src/cmd/compile/internal/ssa/regalloc.go
src/cmd/compile/internal/ssa/stackalloc.go
src/cmd/compile/internal/ssa/tighten.go
src/cmd/compile/internal/ssagen/ssa.go