-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support VEX and EVEX encodings #1154
Comments
We'll definitely support VEX and EVEX at some point. For what it's worth, we added support for those in Spidermonkey a while ago but this resulted in hard to track down slowdowns. I seem to recall it was related to the fact that the VEX chip was slow to start up, such that the cost of starting it up would show up in profiles and sometimes regress performance, if the VEX instructions weren't used a lot. @sunfishcode might have more insights. In the meanwhile, it seems fine to have multi instruction legalizations for the wasm opcodes without VEX, since we'd ideally would like to support SSE2 eventually... |
The Bugzilla bug is https://bugzilla.mozilla.org/show_bug.cgi?id=1124751. Some OS's cause code using VEX prefixes to run significantly slower, so we'll need to determine which OS's and versions are ok, and test for them at runtime. |
Using this will be behind a |
@sunfishcode, we talked about this in IRC a while back and I haven't tried to replicate the issue yet. In fact, I think it would be good to implement the VEX/EVEX encodings so that we can try to find the OS's that cause slowdowns. The way we would use this initially (in truncate/convert) would be along the lines with what you observed on Linux so I would hope we would not see any regressions:
Might be good to expand on what is benchmarked with
|
I believe this is handled with the new framework backend. |
It should be handled but I don't think it is yet... at least not that I know of. I haven't ported the VEX/EVEX encoding stuff over from the old backend. |
This is all covered now in the current |
Add VEX and EVEX encoding mechanisms for x86 code generation.
Certain Wasm SIMD operations (e.g. convert, trunc) only can be lowered with VEX and EVEX encodings. Many VEX and EVEX encodings are only available in later SIMD feature sets (e.g. AVX-512); adding the ability to use VEX and EVEX encodings does not preclude legalizations for x86 CPUs without later SIMD feature sets, but that is a separate issue.
I think the relevant thing here is that it may impact how we go about resolving #1141.
Not having the ability to use VEX and EVEX encodings would force cranelift to use multi-instruction legalizations instead of optimal instructions during instruction selection.
The text was updated successfully, but these errors were encountered: