]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/noder: pointer shaping for unified IR
authorMatthew Dempsky <mdempsky@google.com>
Thu, 18 Aug 2022 10:14:23 +0000 (03:14 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 18 Aug 2022 17:26:10 +0000 (17:26 +0000)
commitb23d469e854f36e5ba8c0de9b7406a81e82d15c1
tree6c8b3be6ab50a4b9a278913a2071b1fff0ab1a94
parent330cffb86951414da5ef2fde912167f6b4d1d91e
cmd/compile/internal/noder: pointer shaping for unified IR

This CL implements pointer shaping in unified IR, corresponding to the
existing pointer shaping implemented in the non-unified frontend.

For example, if `func F[T any]` is instantiated as both `F[*int]` and
`F[*string]`, we'll now generate a single `F[go.shape.*uint8]` shaped
function that can be used by both.

Fixes #54513.

Change-Id: I2cef5ae411919e6dc5bcb3cac912abecb4cd5218
Reviewed-on: https://go-review.googlesource.com/c/go/+/424734
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/noder/writer.go
src/cmd/compile/internal/test/inst_test.go