-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[mono][interp] Add instrinsics for common Vector128 operations #81782
Merged
Commits on Feb 6, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c439344 - Browse repository at this point
Copy the full SHA c439344View commit details
Commits on Feb 15, 2023
-
Configuration menu - View commit details
-
Copy full SHA for d4eb2aa - Browse repository at this point
Copy the full SHA d4eb2aaView commit details
Commits on Feb 21, 2023
-
[mono][interp] Add intrinsics for most common V128 operations
We add intrinsics for Vector128 intrinsics that are actively used within our bcl. We declare a set of simd method names, the same way we do it with jit, in `simd-methods.def`. In `transform-simd.c` we lookup method names in the list of supported intrinsics for `Vector128` and `Vector128<T>`. Once we find a supported instrinsic, we generate code for it, typically a `MINT_SIMD_INTRINS_*` opcode. In order to avoid adding too many new opcodes to the interpreter, simd intrinsics are grouped by signature. So all simd intrinsics that receive a single argument and return a value, will be called through `MINT_SIMD_INTRINS_P_P`. This instruction will receive an index to get the intrinsic implementation and calls it indirectly. Some of the intrinsics are implemented using the standard vector intrinsics, supported by gcc and clang. These do not fully expose the SIMD capabilities, so some intrinsics are implemented naively. This should still be faster than using nonvectorized approach from managed code. In the future we can add better implmentation, on platforms where we have low level support. This would both be faster and reduce code size.
Configuration menu - View commit details
-
Copy full SHA for 7e4a385 - Browse repository at this point
Copy the full SHA 7e4a385View commit details -
Configuration menu - View commit details
-
Copy full SHA for d42c15c - Browse repository at this point
Copy the full SHA d42c15cView commit details -
[mono][interp] Disable simd intrinsics by default on wasm
These intrinsics are not yet implemented on jiterpreter, making it slighty slower instead.
Configuration menu - View commit details
-
Copy full SHA for f69a049 - Browse repository at this point
Copy the full SHA f69a049View commit details -
[mono][interp] Replace v128_create with v128_ldc if possible
v128_create receives as an argument every single element of the vector. This method is typically used with constants. For a Vector128<short> this means that creating a constant vector required 8 ldc.i4 and a v128_create. We can instead use a single instruction and embed the vector value in the code stream directly.
Configuration menu - View commit details
-
Copy full SHA for db74dd5 - Browse repository at this point
Copy the full SHA db74dd5View commit details -
[mono][interp] Remove op_Division
It is actually not used in bcl, it is not really vectorized on any platforms and the codegen for the interp implementation is massive and inefficient.
Configuration menu - View commit details
-
Copy full SHA for 8ffac07 - Browse repository at this point
Copy the full SHA 8ffac07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 629cd94 - Browse repository at this point
Copy the full SHA 629cd94View commit details -
Configuration menu - View commit details
-
Copy full SHA for 719523d - Browse repository at this point
Copy the full SHA 719523dView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.