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/internal/devirtualize: improve concrete type analysis #71935

Open
wants to merge 72 commits into
base: master
Choose a base branch
from

Conversation

mateusz834
Copy link
Member

@mateusz834 mateusz834 commented Feb 24, 2025

This change improves the concrete type analysis in the devirtualizer,
it not longer relies on ir.Reassigned, it now statically tries to
determine the concrete type of an interface, even when assigned
multiple times, following type assertions and iface conversions.

Alternative to CL 649195

Updates #69521
Fixes #64824

Change-Id: Iebc7737713d73690f861955a01ae6f7fa25e32ab
Change-Id: I5a519d6e6351013ca701221d6d1fc0b3bf62d481
Change-Id: I94f6d88c532b217af61c8b415f31f8d72f0b8e3a
Change-Id: Ibcc31325235e75e2f5b8e9775ef48b8576047c82
Change-Id: I92ef963674619ec1ce0c36240127d8aa3308808d
Change-Id: I3a9b26b5d87e0be64c42e0d8e07cc6be7a3d4a24
Change-Id: I65936baa27e237c82587876a60651e2e649846a2
Change-Id: Ie886020240448e36454252e957aec3158a4a2e8e
Change-Id: If772bf85e30e8729c72d601d9bea40e46a3dbd57
Change-Id: Ic23f2d02588c299587de99fe2696e9d6bc0c0abc
Change-Id: I228642e30eff6c963b91cde87fe37bade9743a49
Change-Id: I2adc6bce361f29ef5d59d694004d3c2f57bde443
Change-Id: I41aa7dafcd5578170fa20ef3051623c17d008786
Change-Id: Ib422c5aaa3c47f1842561273911ac8d7474dab56
Change-Id: I47372cc2a2f18fb843572757902b1730dd963bde
@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 12: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 12:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 12: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

Change-Id: Ic9c5b6d584b9fed42c06512c4ba69235efe21cce
Change-Id: Ie7e0cceff262e231c925bd3c91203ba4c0baa841
Change-Id: I7dd1a79963ab7f7930262b8463386faad53691b5
Change-Id: I19c5a3947ea331e6a7daa4fedaa1ff1e99c28203
Change-Id: I49603747594959eb93c5398c60d4076d1b14f3b8
@gopherbot
Copy link
Contributor

This PR (HEAD: d17776d) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/652036.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 13: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 13:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2025-02-28T16:14:50Z","revision":"f2a143b48f1fb89b7704be9794fa6a83f6102fe0"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 13: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 13:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 13: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

Change-Id: I1513a3e836190ebdbe41431abbf5f978a5cfa036
Change-Id: I5e7b39f9d9bb0d41e7490ca139caf681bc7615b0
@gopherbot
Copy link
Contributor

This PR (HEAD: f82d9e4) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/652036.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 14: Commit-Queue+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 14:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2025-03-02T19:34:11Z","revision":"e996265bdde4b1b3b17e498c1a6d925dad07854b"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 14: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 14:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 14: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

Change-Id: Ic8164073baddc803e8e102c3088aec4724c7535f
Change-Id: I961be6ae172f8f4b82f4d5b84d45d00f1c5ac05d
@gopherbot
Copy link
Contributor

This PR (HEAD: cf7322c) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/652036.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 15: Commit-Queue+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 15:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2025-03-03T18:35:28Z","revision":"0cf007b9971079a8eaad44c1791a193f30983f5d"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 15: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 15:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 15: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/652036.
After addressing review feedback, remember to publish your drafts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cmd/compile: devirtualization of interface calls with type assertions
3 participants