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

Heap2Local: Optimize packed fields #6480

Merged
merged 65 commits into from
Apr 9, 2024
Merged

Conversation

kripken
Copy link
Member

@kripken kripken commented Apr 9, 2024

Previously we did not optimize a struct or an array with a packed field. As a result a
single packed field in a struct prevented the entire struct from being localized,
which this fixes. This is also useful for arrays as packed arrays are common (e.g. for
string data).

@kripken kripken requested a review from tlively April 9, 2024 20:44
return false;
}
return true;
return TypeUpdating::canHandleAsLocal(field.type);
Copy link
Member

Choose a reason for hiding this comment

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

FWIW this is always true, and I can't imagine that we would allow a future proposal to make this anything but true.

@kripken kripken merged commit 738e8fc into WebAssembly:main Apr 9, 2024
13 checks passed
@kripken kripken deleted the heap2local.3 branch April 9, 2024 22:31
kripken added a commit that referenced this pull request Apr 10, 2024
In #6480 I forgot that StructGet can be signed, which means we need to emit
a sign-extend.

Arrays already copied the field as part of Array2Struct.
@gkdn gkdn mentioned this pull request Aug 31, 2024
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