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

Make execution of declare_vmruntime_limits_ptr conditional again #105

Open
frank-emrich opened this issue Feb 15, 2024 · 0 comments
Open

Comments

@frank-emrich
Copy link

frank-emrich commented Feb 15, 2024

As of #99, cranelift_wasm::FuncEnvironment::declare_vmruntime_limits_ptr is always executed unconditionally in before_translate_function. This is to ensure that the ir::Variable named vmruntime_limits_ptr can always be used in translate_resume. It would be better to check if there is a resume instruction in the function under consideration, and make the execution of declare_vmruntime_limits_ptr dependent on that.

However, the current workaround should have no runtime overhead, as it simply adds a CLIF load that is potentially unused and therefore eliminated if we don't actually translate a resume.

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

No branches or pull requests

1 participant