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

[NFC-ish] Remove LocalGraph from LocalSubtyping #6921

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

kripken
Copy link
Member

@kripken kripken commented Sep 9, 2024

The LocalGraph there was used for two purposes:

  1. Get the list of gets and sets.
  2. Get only the reachable gets and sets.

It is trivial to get all the gets and sets in a much faster way, by just walking the
code as this PR does. The downside is that we also consider unreachable gets
and sets, so unreachable code can prevent us from optimizing, but that seems
worthwhile as many passes make that assumption (and they all become
maximally effective after --dce).

Removing LocalGraph + the fixup code for unreachability makes this
significantly shorter, and also 2-3x faster.

@kripken kripken requested a review from tlively September 9, 2024 23:53
// If we ever optimized, then we also need to do a final pass to update any
// unreachable gets and tees. They are not seen or updated in the above
// analysis, but must be fixed up for validation to work.
if (optimized) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay for deleting code!

@kripken kripken merged commit 203dcd5 into WebAssembly:main Sep 10, 2024
13 checks passed
@kripken kripken deleted the unlg.local-subtyping branch September 10, 2024 16:54
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.

2 participants