-
Notifications
You must be signed in to change notification settings - Fork 5k
[wasm][jiterp] RelaxedSimd jiterpreter intrinsics #115444
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
Lgtm |
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.
Pull Request Overview
This PR introduces support for relaxed_simd intrinsics in the Jiterpreter to enable potentially faster SIMD swizzle operations. The changes add new fields to helper types, update the import of relaxedSimd from the wasm‐feature‐detect package, and use the new relaxed swizzle opcode in the trace generator when the feature is available.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/mono/browser/runtime/types/internal.ts | Added relaxedSimd and featureWasmRelaxedSimd to helper types |
src/mono/browser/runtime/loader/globals.ts | Updated the import to include relaxedSimd from wasm-feature-detect |
src/mono/browser/runtime/jiterpreter-trace-generator.ts | Conditionally emits i8x16_relaxed_swizzle if feature is enabled |
Comments suppressed due to low confidence (1)
src/mono/browser/runtime/loader/globals.ts:7
- [nitpick] Please verify that the version of the wasm-feature-detect package being used supports the relaxedSimd API to prevent potential runtime issues.
import { exceptions, simd, relaxedSimd } from "wasm-feature-detect";
Tagging subscribers to 'arch-wasm': @lewing |
This is just a first step to allow the Jiterpreter to use the potentially faster relaxed_swizzle in the case where we know the swizzle indices are valid and can detect at runtime the opcode is supported. There is follow-up work planned to use the relaxed_swizzle in more cases, but this is a good first step to get the infrastructure in place