Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: implement pointer shaping for unified IR #54513

Closed
mdempsky opened this issue Aug 18, 2022 · 2 comments
Closed

cmd/compile: implement pointer shaping for unified IR #54513

mdempsky opened this issue Aug 18, 2022 · 2 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mdempsky
Copy link
Member

mdempsky commented Aug 18, 2022

CL 421821 adds basic shaping to unified IR: all type arguments are shaped to their underlying type.

It should be possible to shape further. In particular, Go 1.18 and Go 1.19 shaped pointer types together. E.g., F[*int] and F[*byte] could use the same F[go.shape.ptr] if the code didn't rely on the pointed-to type.

Beyond that, I expect we can shape structs by ignoring their field names and tags; and shape all composite types by recursively shaping their element types.

@mdempsky mdempsky added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 18, 2022
@mdempsky mdempsky added this to the Go1.20 milestone Aug 18, 2022
@mdempsky mdempsky self-assigned this Aug 18, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Aug 18, 2022
@mdempsky
Copy link
Member Author

mdempsky commented Aug 18, 2022

Pointer-shaping is tested by cmd/compile/internal/test.TestInst.

@gopherbot
Copy link

gopherbot commented Aug 18, 2022

Change https://go.dev/cl/424734 mentions this issue: cmd/compile/internal/noder: pointer shaping for unified IR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants