]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: make [0]T and [1]T SSAable types
authorKeith Randall <khr@golang.org>
Mon, 31 Oct 2016 04:10:03 +0000 (21:10 -0700)
committerKeith Randall <khr@golang.org>
Mon, 31 Oct 2016 19:44:19 +0000 (19:44 +0000)
commit741445068f7f582824f1c5625159e0b728090265
treef31cea51647013761ae19e6948370de586208a7e
parent9c066bab643a0224decdd71813096e0d1df0624c
cmd/compile: make [0]T and [1]T SSAable types

We used to have to keep on-stack copies of these types.
Now they can be registerized.

[0]T is kind of trivial but might as well handle it.

This change enables another change I'm working on to improve how x.(T)
expressions are handled (#17405).  This CL helps because now all
types that are direct interface types are registerizeable (e.g. [1]*byte).

No higher-degree arrays for now because non-constant indexes are hard.

Update #17405

Change-Id: I2399940965d17b3969ae66f6fe447a8cefdd6edd
Reviewed-on: https://go-review.googlesource.com/32416
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/config.go
src/cmd/compile/internal/ssa/decompose.go
src/cmd/compile/internal/ssa/export_test.go
src/cmd/compile/internal/ssa/gen/generic.rules
src/cmd/compile/internal/ssa/gen/genericOps.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewritegeneric.go