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

cranelift-wasm: Add a small optimization for dynamic memories with min_size == max_size #7374

Merged

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Oct 25, 2023

In this case, we don't need to load the dynamic heap bound from the vmctx
because it actually has a constant size. Instead, we can use the constant
directly.

…in_size == max_size`

In this case, we don't need to load the dynamic heap bound from the vmctx
because it actually has a constant size. Instead, we can use the constant
directly.
@fitzgen fitzgen requested review from a team as code owners October 25, 2023 21:39
@fitzgen fitzgen requested review from cfallin and alexcrichton and removed request for a team October 25, 2023 21:39
@fitzgen fitzgen changed the title Dynamic memories with constant size cranelift-wasm: Add a small optimization for dynamic memories with min_size == max_size Oct 25, 2023
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Mind adding a test for a (memory 1 2) as well to ensure that a constant size isn't used?

@fitzgen fitzgen enabled auto-merge October 25, 2023 21:58
@fitzgen fitzgen added this pull request to the merge queue Oct 25, 2023
Merged via the queue into bytecodealliance:main with commit 952c6a5 Oct 25, 2023
@fitzgen fitzgen deleted the dynamic-memories-with-constant-size branch October 25, 2023 23:17
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