-
Notifications
You must be signed in to change notification settings - Fork 810
[Custom Descriptors] Optimize RefCast to RefCastDesc in GlobalStructInference #7906
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not enough to check that we have a single global for the descriptor type; we must also check that there are no allocations of that descriptor type besides the initializer for that one global.
That is something the pass verifies, binaryen/src/passes/GlobalStructInference.cpp Lines 113 to 115 in 46b37d3
Unless I misunderstood you? |
Great, I had forgotten we already did that. |
There are some TODOs here, but the larger question is whether this seems worthwhile. I see a 1% code size regression on j2cl for example - do we expect the benefit to be larger than that? @tlively @jakobkummerow |
This is primarily a performance improvement. |
Makes sense, but do we think it is fast enough to justify a 1% size regression? Given that iiuc we think the VM can do much of this too. |
No description provided.