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 33 commits into
base: master
Choose a base branch
from

Conversation

mateusz834
Copy link
Member

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

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
Change-Id: I5f1523f505b050ad46bac22938527550a2610622
@gopherbot
Copy link
Contributor

This PR (HEAD: a957ba9) 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.

Change-Id: Ibb6e978384c84b2894dabb2319f8121aab27cac1
@gopherbot
Copy link
Contributor

This PR (HEAD: 92b33c0) 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 2: 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!

Change-Id: I4105f949b41c8443a1b11c5590a84a4ecfbbd2a3
@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 2:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2025-02-24T19:39:48Z","revision":"a2b90406da463d84f7606706a10c2e6372a13a95"}


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 2: -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 2:

This CL has failed the run. Reason:

Tryjob golang/try/gotip-linux-amd64-newinliner has failed with summary (view all results):


Build or test failure, click here for results.

To reproduce, try gomote repro 8722024791248491105.

Additional links for debugging:


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 2: 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!

@gopherbot
Copy link
Contributor

This PR (HEAD: fc782d5) 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 3: 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 3:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2025-02-24T19:56:59Z","revision":"9d69609570d77cc1942e98c4f1780198aaa7a364"}


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 3: -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 3:

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 3: 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!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 3:

(6 comments)


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
2 participants