Skip to content

Pass operand types in to Wasm-to-CLIF translation #11030

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

Merged
merged 2 commits into from
Jun 13, 2025

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Jun 12, 2025

This lets us generate better CLIF based on what we know of the Wasm types. There is a bunch we can do here, but this commit just lays down the initial infrastructure and plumbs the type info through to the ref.is_null implementation. We will now avoid actually performing null check when the input to a ref.is_null instruction is a non-nullable ref type.

Note that this depends on a fix for bytecodealliance/wasm-tools#2235 and then a new wasm-tools release.

@fitzgen
Copy link
Member Author

fitzgen commented Jun 13, 2025

With bytecodealliance/wasm-tools#2237, this is now passing all tests locally, so I'll cut a wasm-tools release, update those crates in this repo, and then this PR can rebase and merge.

@fitzgen
Copy link
Member Author

fitzgen commented Jun 13, 2025

wasm-tools dep update in #11034

@fitzgen fitzgen force-pushed the wasm-types-in-translation branch from 0dcc3fa to 6a04cb3 Compare June 13, 2025 16:23
@fitzgen fitzgen marked this pull request as ready for review June 13, 2025 16:23
@fitzgen fitzgen requested review from a team as code owners June 13, 2025 16:23
@fitzgen fitzgen requested review from alexcrichton and removed request for a team June 13, 2025 16:23
fitzgen added 2 commits June 13, 2025 09:58
This lets us generate better CLIF based on what we know of the Wasm types. There
is a bunch we can do here, but this commit just lays down the initial
infrastructure and plumbs the type info through to the `ref.is_null`
implementation. We will now avoid actually performing null check when the input
to a `ref.is_null` instruction is a non-nullable ref type.
@fitzgen fitzgen force-pushed the wasm-types-in-translation branch from 6a04cb3 to de97486 Compare June 13, 2025 17:15
@fitzgen fitzgen requested a review from a team as a code owner June 13, 2025 17:15
@fitzgen fitzgen requested review from cfallin and removed request for a team June 13, 2025 17:15
@fitzgen fitzgen enabled auto-merge June 13, 2025 17:15
@fitzgen fitzgen added this pull request to the merge queue Jun 13, 2025
Merged via the queue into bytecodealliance:main with commit 07a785b Jun 13, 2025
41 checks passed
@fitzgen fitzgen deleted the wasm-types-in-translation branch June 13, 2025 17:50
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